vote up 0 vote down star

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.

flag
belongs to superuser.com – RageZ Nov 18 at 2:08

migrated from stackoverflow.com

2 Answers

vote up 1 vote down

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.

link|flag
Wouldn't ACLs also work for this? – Marcin Gil Nov 18 at 7:15
@Marcin - I don't think so. Can you figure it out? See linux.about.com/library/cmd/… – NVRAM Nov 19 at 19:43
vote up 0 vote down

Thanks for the quick reply.

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.

link|flag
ah, then it might be a directory permissions issue. what are the directory permissions? – Am Nov 18 at 2:25
@cameron, your 'Answer' should have been made as a comment to NVRAM's answer. – pavium Nov 18 at 5:50

Your Answer

Get an OpenID
or
never shown

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