Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there a way to change who can chmod (change the permissions of) a particular file?

It is only the owner of the file (without sudo-ing it), if my experimentation has been correct?

But what I want to do is allow on the group to be able to edit the file permissions, and not the owner.

This isn't possible under the traditional Unix file system I don't think, but I'm wondering if there is a sneaky way it can be done using ACLs or something similar?

share|improve this question
3  
Only the owner of a file can change its permissions. What you're asking for doesn't make a huge amount of sense, since it effectively gives all permissions to all members of the group. Why do you need this? –  ire_and_curses Jan 17 '13 at 0:13
    
We are running a shared web server, and have been having issues with hacking so we want to by default set the web server as the owner, and give it r-x only, to prevent it from uploading files. Each site has a group which all developers are in, so they can upload content. But there are reasons when you want it to write (file uploads) and in which case it should be able to write. And we don't give sudo out, we want to give the people who upload content and manage their sites the ability to let the web server have write access if it needs it. –  penguin Jan 17 '13 at 14:38

1 Answer 1

Only the owner of the file (and root) are allowed to change permissions to a file. Perhaps you should allow your users to do some stuff as the web server's user (via sudo(1))?

share|improve this answer

Your Answer

 
discard

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

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