The docs for sftp-server
state that the -d
option is useful in conjunction with the sshd_config ChrootDirectory option. I've also seen some answers on the internet where in order to restrict users to a specific folder you should combine the -d
option with ChrootDirectory
, like the docs mention.
However, when testing (server and client both running windows 10) I found that ChrootDirectory
alone was enough and the user could never access parent folders:
Subsystem sftp sftp-server.exe
AllowUsers test
ForceCommand internal-sftp
ChrootDirectory "E:\Some\Path\To\Some\Folder"
So my question is, when should the -d
option be used and when is only ChrootDirectory
enough?