3

I have a directory set up on a Linux server such that I'd like all files within it to be readable and writeable for a specific group.

So far, I've done chmod g+s mygroup parent, and I can see that all files inherit this group when created within this directory.

However, it does not force the g+rw permission, and so it is possible for a user to write a file into that directory such that others do not have read and/or write access to it.

How can I achieve this?

1
  • What is mygroup? Because of its name I expect a group but the syntax of chmod g+s mygroup parent doesn't fit. This obfuscates the question slightly. Commented Oct 21, 2018 at 5:25

1 Answer 1

5

Turns out the answer is to use ACLs to set a default:

setfacl -d -m u::rwX,g::rwX,o::- /path/to/parent

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .