1

I'm trying to set up a 'deploy' user on my VPS (running CentOS 6 and cPanel) which needs to have access to a specific folder from another home directory: /home/nazeem/public_html/staging.

I've created the deploy user succesfully, but logically it didn't have access to the specific home folder of user nazeem. After some reading I discovered that I need to put both users in a group and give the staging folder group permissions.

I've added both users to the group deploy, as is displayed in the /etc/group file:

deploy:x:32012:nazeem,deploy

I also changed the ownership of the folder:

drwxrwxr-x  3 deploy deploy 4096 feb 21 20:07 staging/

However, when I cd to the folder as user deploy, I still get the following:

-bash: cd: /home/nazeem/public_html/staging: Permission denied

Does anybody have any idea how to fix this?

1 Answer 1

3

You should also ensure that you have the right to access (go through) the /home/nazeem/public_html and /home/nazeem folders. You can achieve this by doing a chgrp to group deploy on both folders, and setting the execution rights for the group on these folders (execution permission on a directory gives the right to go through it).

chgrp deploy /home/nazeem/public_html /home/nazeem
chmod g+x /home/nazeem/public_html /home/nazeem

You must log in to answer this question.

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