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
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!