I am trying to get a script going that will move files in the apache webserver directory for me without sudo. In my mucking around I somehow got edit and move permissions working for user nhergert, but when I tried to trace my steps again it didn't work with tom. Permissions of the file (user www-data and group www-data are owners, the sticky bit is not set, permissions of 770):

-rwxrwx---  1 www-data www-data      1766 Jun 23 16:28 index4.html

Members in group www-data:

> getent group www-data

tom and nhergert are both members of www-data:

> id nhergert
uid=1000(nhergert) gid=1000(nhergert) groups=1000(nhergert),4(adm),24(cdrom),27(sudo),29(audio),30(dip),33(www-data),46(plugdev),109(lpadmin),124(sambashare)
> id tom
uid=1001(tom) gid=1001(tom) groups=1001(tom),33(www-data),1000(nhergert)

Any ideas? Thanks!

2 Answers 2


Sorry everyone! Apparently changes to groups don't update until the next time the user logs in. So, tom's membership in www-data applied when I closed his terminal session and logged back in.


I'd guess it's a problem of the directory (where index4.html is located) not having the correct access bits. Not only the files, but also all parent directories need to have rwx access (or whatever you need) for the www-data group too.

  • Good idea. I thought it was that except nhergert has access too. Jun 24, 2015 at 16:51

You must log in to answer this question.

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