OpenSSH SFTP server with chroot()
- by HannesFostie
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