1

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

Mitchell Ross
  • 11
  • 1
  • 4
  • 1
    `/var/www/html` and `/html` are not the same. Either there you have your answer, or you should correct your post. – angus Oct 03 '12 at 04:48
  • 1
    Another idea is that you must logout and log back in for new groups to take affect. – jordanm Oct 03 '12 at 05: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 03 '12 at 05: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 03 '12 at 06: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 03 '12 at 07:53
  • alright there you go Pitt, sorry I'm still kinda new to all this – Mitchell Ross Oct 03 '12 at 20:04
  • Also, it's usually easier to manage permissions in `/var/www/html` through ACLs. See [Make all new files in a directory accessible to a group](http://unix.stackexchange.com/q/12842) – Gilles 'SO- stop being evil' Oct 03 '12 at 22:31

1 Answers1

0

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 .
Pitt
  • 141
  • 4
  • 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 03 '12 at 20:08