Forum archive
SFTP - wrong home directory
I am using the File Server appliance as a SFTP server.
I set up the root directory for SFTP with ChrootDirectory to /srv/ftp/
From there I have the home directories (/srv/ftp/UserX).
The problem is that when UserX logs in, he is directed to root directory (aka /srv/ftp) rather than its own home. Therefore every user has to do a "cd /UserX" after logs in, so they can up/down files.
Setting ChrootDirectory to "/srv/ftp/%u" or "/%h" gives errors on the client side.
Is there any way I can set it up so every user hits his own home directory at login?
Please help.
Thank you.
In my experience users should automatically log in to their home directory. It sounds as though you have setup a chroot for all your users rather than one for each. Perhaps that's got something to do with it? Perhaps better to put all your users in their own and create a shared one for anything you want them all to have access to.
There is some handy info re SFTP and FTPing with TKL in the forums. This post is probably a good start.