Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Possible Duplicate:
How to add write permissions for a group?

On Centos 6 I'm trying to give full access to make and delete by the user mitch for /var/www/http.

I did addgroup www and then chmod -R 775 /var/www/html then groupmod -g www mitch, and did a chgrp -R www /var/www/html but when I went into /html on mitch and tried to make a file with touch it said "permission denied."

Can someone help me make anyone in www able to create and delete in the html dir?

drwxr-xr-x.  6 root root 4096 Feb 13  2012 .
drwxr-xr-x. 22 root root 4096 Sep 29 23:30 ..
drwxr-xr-x.  2 root root 4096 Feb 13  2012 cgi-bin
drwxr-xr-x.  3 root root 4096 Oct  1 21:23 error
drwsrwsr-x.  2 root www  4096 Oct  2 16:15 html
drwxr-xr-x.  3 root root 4096 Oct  2 16:13 icons

is the ls -la output for the /var/www dir

share|improve this question

marked as duplicate by Gilles, Renan, jasonwryan, warl0ck, phunehehe Oct 5 '12 at 12:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
/var/www/html and /html are not the same. Either there you have your answer, or you should correct your post. –  angus Oct 3 '12 at 4:48
1  
Another idea is that you must logout and log back in for new groups to take affect. –  jordanm Oct 3 '12 at 5:23
    
@Mitchell Ross: Can you show the directory permissions of /var/www/html using ls -l and groups in which mitch user is belonging using groups mitch command. That will be more easier to debug the problem. –  pradeepchhetri Oct 3 '12 at 5:31
    
[mitch@vps html]$ ll total 4 -rwxrwxr-x. 1 root www 21 Oct 2 16:15 info.php and [mitch@vps html]$ groups mitch mitch : mitch www –  Mitchell Ross Oct 3 '12 at 6:34
    
it would be nicer to edit your question and add the results of your ls -l. Even better would be to use ls -al ;) –  Pitt Oct 3 '12 at 7:53
show 2 more comments

1 Answer 1

When in the folder /var/www/html check the permissions of the "." 'folder'. it could be that mitch does not have the same permissions on that, thus cannot delete/modify stuff in that folder, but since you ran the chmod recursively before, mitch would have 775 permission in all of the subdirectories of /var/www/html.

To fix:

cd /var/www/html
chgrp www .
chmod 775 .
share|improve this answer
    
Thank you for your guy's help, I just restarted my computer and now its letting me create files under mitch, guess I should have tried a restart before wasting your time, thanks again –  Mitchell Ross Oct 3 '12 at 20:08
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.