I have setup Ubuntu as a development web server - however I am experiencing problems with file permissions. I have 2 users, user1 and user2, and they both have been put into the group www-data.

I have uploaded a new file with user1 so the file is owned by user1 and the www-data group.

At present if user2 wants to modify the permissions on that file to say 777 - they cannot.

Is there a way to allow any users within a group to be able to modifiy permissions etc.. on this file? I have tried changing umask to 002 and a few other combinations that were suggested without luck.


From chmod(2) --

   The effective UID of the calling process must match the  owner  of  the
   file,  or  the  process  must  be  privileged  (Linux: it must have the
   CAP_FOWNER capability).

However, user2 (with write permissions on the directory) could create a copy of the file, set its permissions, then replace the original file with the copy.

  • Wouldn't ACLs also work for this? – Marcin Gil Nov 18 '09 at 7:15
  • @Marcin - I don't think so. Can you figure it out? See linux.about.com/library/cmd/blcmdl1_setfacl.htm#lbAG – NVRAM Nov 19 '09 at 19:43
  • By Cameron: In response to your answer: They can modify the file but they cannot modify the permissions. Say for example I upload a directory and it is set to 755 and it owned by user1. user2 is not able to change that directories permissions to 777 - only user1 is able to. I would want any user who is in the same user group to be able to modify a files permissions. – Ivo Flipse Mar 16 '10 at 8:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy