I have a user who I only want to be able to access /var/www/ucp/ (his home directory). I have executed the following command on the / directory, the /var/ directory and the /var/www/ directory: chmod o-rwx ~

However, when I connect to this user via SSH, they can still navigate out of the /var/www/ucp/ directory. I do not want them to be able to access any other directory at all, but I do want them to have full access to everything inside /var/www/ucp/.

How can I do this?


1 Answer 1


Simply give read and execute access to /var/www/ and read write and execute access to ucp

cd /var/www/ chmod 777 ucp cd ../../ chmod 555 /var

or even complicated by making execute access to /var/www but in this case you have to make sure that user will type a complete path to reach at ucp

cd /var/www chmod 777 ucp cd ../../ chmod 111 /var

Note:- 777 are subjected to your policy i mean the permission what you to give that dir "UCP" can be replace by 777

Not the answer you're looking for? Browse other questions tagged .