Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 1
    So I added Match Group sftp ChrootDirectory /var/www/vhosts AllowTcpForwarding no In sshd_config and created user and group as you did but user foo has rights to all folders :( Commented Jun 22, 2016 at 9:56
  • @Delirium see my updated answer Commented Jun 22, 2016 at 10:20
  • Thank you so much for your asnwer. But there must be some mistake.. I added Subsystem sftp internal-sftp Match Group sftp ChrootDirectory /var/www/vhosts AllowTcpForwarding no ForceCommand internal-sftp but there is error when I want to restart ssh /etc/ssh/sshd_config line 92: Directive 'UsePAM' is not allowed within a Match block Commented Jun 22, 2016 at 10:29
  • 2
    @Delirium I have clearly mentioned to put Match..... section at the END of file. Put that code at the end of file and restart it. Commented Jun 22, 2016 at 10:35
  • 1
    Sorry for my blind eyes, but it works, so really thank you. Commented Jun 22, 2016 at 10:48