Network and Storage Protocols

Issue with sftp accessed by local users in /etc/passwd

Hi all,

I am having issue to access  /etc folder using SFTP for adminitration purpose.

The controller is runing 7-mode 8.1.4p1 with NFS licensed and I used the following page as guidance

However, when I tried to connect to the controller by WinSCP/Filezilla, the storage console returned the following messages, and then SFTP connection creation failed.
[controller01: sshd_1:error]: error: Disconnecting: SFTP connection creation failed
[controller01:sftp.connection.setup.failed:error]: SFTP (SSH File Transfer Protocol) connection (#72) from client system xx.xx.xx.xx, user sftpuser failed. Reason: Homedir not set

In /etc/passwd, I have created a new sftpuser and specified the the homedirectory  /etc:

Also checked by getXXbyYY getpwbyname_r
pw_dir = /etc

sftp settings..
options sftp.auth_style unix
options sftp.dir_override (null)
options sftp.enable on

ssh.enable on
ssh1.enable off
ssh2.enable on

All other controllers are working...except this one, I tried to compare the settings, re-configured SFTP, created new sftp users, sftp.dir_override directory, but none of them works.

Thanks in advanced.


What is in your nsswitch.conf? Is filer set to uset /etc/passwd for users and in which order?


Hi aborzenkov,


rdfile /etc/nsswitch.conf


hosts: files        nis    dns

passwd: files     nis    ldap

netgroup: files  nis   ldap

group: files       nis    ldap

shadow: files     nis





I think the home directory should be set to /vol/vol0/etc  ?


Hi rwelshman


I tried different paths in the /etc/passwd file under different user names..but unfortunately...all failed






have you tried setting the sftp.dir_override option to /vol/vol0/etc?


I tried the following settings, but all failed.

sftp.dir_override           /

sftp.dir_override           /vol

sftp.dir_override           /vol/vol0

sftp.dir_override           /vol/vol0/etc


Done further checking on the sftp log (/etc/log/sftp.cmd), it seems like the path is set to /vol/vol0, instead of  /vol/vol0/etc

Ptype          SSH_FXP_INIT Version 3

Ptype SSH_FXP_REALPATH Id 256 Path /vol/vol0


Did I miss anything?