I would like to use SFTP over OpenSSH as a small FTP server. However I would like to use a mounted hard drive or USB stick as the chrooted directory for the user.
As far as I see, chrooting is achieved through an entry like this in
Subsystem sftp internal-sftp Match Group sftp ChrootDirectory %h ForceCommand internal-sftp AllowTcpForwarding no
But I would like to replace the
ChrootDirectory %h through something like
This does not seem to work as of right now and I think this is due to the fact that the access rights are not correct. Everey auto mounted device has read and write access only for the currently logged in user. How can I change this?