OpenSSH SFTP server with chroot()

Posted by HannesFostie on Server Fault See other posts from Server Fault or by HannesFostie
Published on 2010-05-04T13:17:15Z Indexed on 2010/05/04 13:19 UTC
Read the original article Hit count: 459

Filed under:
|

I am currently setting up an SFTP server but there is one detail I can't seem to figure out.

When I add a user, I would like him to connect using his client and be able to write in his "root dir" right away.

My Match case for the SFTP-users group currently has ChrootDirectory set as "/home/%u", and inside that directory I have to have a subdirectory owned by the user, while /home/%u itself is owned by root.

Next to that, the "root dir" also has a couple files, .bashrc to name one. Is it possible to put these files somewhere else, remove them, or at least make them invisible to the user?

Thanks

© Server Fault or respective owner

Related posts about openssh

Related posts about sftp