Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a web server that I use to host my websites. I have all the websites in folders in /srv/www. There is a Wordpress site that I want to give SFTP access to another developer, how would I go about doing this so that they only have access to /srv/www/thesite.com and not any other directories?

Running Ubuntu 9.04.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

You can configure chroot using OpenSSH. Keep in mind that this is not a definitive security solution.

Specify the following in sshd_config and restart OpenSSH.

Match user youruser
         ChrootDirectory /srv/www/thesite.com
         X11Forwarding no
         AllowTcpForwarding no
         ForceCommand internal-sftp
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.