I have a directory (With sub directories and files) that I would like to setup so that:

-Users of an 'editors' group can rw- any file and rwx any dirs.

-Users of www-data can r-- files and r-x dirs.

But there doesn't seem to be a way to do this. Can I set owner to be the 'editors'? Or is the only realistic way of doing this to just treat www-data's access as 'other'?

  • 1
    I'd suggest you look into linux filesystem ACLs. – EEAA Jan 13 '15 at 22:58
  • Thanks, I know about ACL's, I just wanted to know if it was possible to do it without them. I have seen people refering to making the owner a group, not a user? – Myforwik Jan 14 '15 at 0:03

Before ACLs were introduced, there was an old trick to do this, but not fully equivalent to ACLs - you could create a custom group for accessing your particular directory, and add the appropriate users to it, repeat for each directory. The only limitation is that all the users will share the same access level per group, and each directory can have only one group owner. So if you want your permission set to be really flexible and complex, POSIX ACls are your friends.

Your Answer

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

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