In the sshd_config(5) man page in my system I found this remark in the section about ChrootDirectory
:
For safety, it is very important that the directory hierarchy be prevented from modification by other processes on the system (especially those outside the jail). Misconfiguration can lead to unsafe environments which sshd(8) cannot detect.
Is there anywhere I can read about the associated vulnerabilities if some external process does modifications to the directory hierarchy?
I'm thinking about setting up a SFTP server where I can drop a few files to share with external users, restricting access to specific target directories to each of them.
While these users would be restricted to using SFTP only and only to those directories (thanks to ChrootDirectory
), I would still be able to put the files in place from time to time, which would happen through other processes on the system which would be outside of the jail.
I wonder if this simple use case can lead to some vulnerability too - any light would be very appreciated!