1

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?

0

1 Answer 1

0

You might chroot to a shared /some/directory, where each user has its own subdirectory.

You will then want to set -d to /%u. That way each user starts in his/hers directory, but can access the others.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .