SFTP user chrooted to wwwroot subfolder (Nginx): Difference between revisions

no edit summary
No edit summary
No edit summary
 
Line 55: Line 55:
Add (or uncomment) the sftp paragraph:
Add (or uncomment) the sftp paragraph:


*Match User sftpuser
Match User sftpuser


**ChrootDirectory /var/www/siterootfolder/sftp(sub)folder/
:ChrootDirectory /var/www/siterootfolder/sftp(sub)folder/


**X11Forwarding no
:X11Forwarding no


**AllowTcpForwarding no
:AllowTcpForwarding no


**ForceCommand internal-sftp
:ForceCommand internal-sftp


This way the user will only have access to his 'home' folder, seeing it as a root folder.
This way the user will only have access to his 'home' folder, seeing it as a root folder.