Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Nov 18 '09 at 2:18

This question came from our site for professional and enthusiast programmers.

1 Answer 1

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.

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.