Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

So here is the situation.

I have a webserver hosting a clients website and he would like to have sftp access to it.

Server OS: ubuntu 10.04

I would like to confine his useraccount to his public_html folder so he can make edits as he would like.

Within the /etc/ssh/sshd_config I have added:

  • SubSystem sftp internal-sftp Match Group sftp
  • ChrootDirectory %h
  • ForceCommand internal-sftp=
  • AllowTcpForwarding No

Restarted SSH

Created the Sftp user: sftp-ros

Created the Sftp group: sftp

The html folder is located: /home/ros/public_html

Now this is where I get a little confused. The guide wants me to change the directory to root:root group and owner. When I follow this guide apache loses access to the website and it goes down.

  • # usermod -G sftp sftp-ros
  • # usermod -s /bin/false sftp-ros
  • # chown root:root /home/ros/public_html
  • # chmod 0755 /home/ros/public_html

In an effort to get the site back up I needed to undo all of the permission changes. Can someone help point me to what I need, I will be looking into permissions a bit more to become more familure with them.

Thanks for any help!

share|improve this question
Does it work if you don't change the permissions on that directory? That is, both apache and sftp as sftp-ros can access the folder? – wingedsubmariner Sep 14 '13 at 14:15
I needed to update this, I had the permissions set as 700. If you correctly set the permissions as 755 as stated in the guide everything will be golden! – Christopher Ervin Sep 18 '13 at 17:59

Your Answer


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

Browse other questions tagged or ask your own question.