Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/ and not any other directories?

Running Ubuntu 9.04.

share|improve this question
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/
         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.