How to force specific group permissions (r/w) on files created in a directory structure?
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
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?
linux permissions
add a comment |Â
up vote
2
down vote
favorite
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?
linux permissions
What ismygroup
? Because of its name I expect a group but the syntax ofchmod g+s mygroup parent
doesn't fit. This obfuscates the question slightly.
â Kamil Maciorowski
13 mins ago
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
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?
linux permissions
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?
linux permissions
linux permissions
edited 5 hours ago
asked 5 hours ago
Roxy
1366
1366
What ismygroup
? Because of its name I expect a group but the syntax ofchmod g+s mygroup parent
doesn't fit. This obfuscates the question slightly.
â Kamil Maciorowski
13 mins ago
add a comment |Â
What ismygroup
? Because of its name I expect a group but the syntax ofchmod g+s mygroup parent
doesn't fit. This obfuscates the question slightly.
â Kamil Maciorowski
13 mins ago
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.â Kamil Maciorowski
13 mins ago
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.â Kamil Maciorowski
13 mins ago
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
Turns out the answer is to use ACLs to set a default:
setfacl -d -m u::rwX,g::rwX,o::- /path/to/parent
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Turns out the answer is to use ACLs to set a default:
setfacl -d -m u::rwX,g::rwX,o::- /path/to/parent
add a comment |Â
up vote
2
down vote
Turns out the answer is to use ACLs to set a default:
setfacl -d -m u::rwX,g::rwX,o::- /path/to/parent
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Turns out the answer is to use ACLs to set a default:
setfacl -d -m u::rwX,g::rwX,o::- /path/to/parent
Turns out the answer is to use ACLs to set a default:
setfacl -d -m u::rwX,g::rwX,o::- /path/to/parent
answered 3 hours ago
Roxy
1366
1366
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1368586%2fhow-to-force-specific-group-permissions-r-w-on-files-created-in-a-directory-st%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
What is
mygroup
? Because of its name I expect a group but the syntax ofchmod g+s mygroup parent
doesn't fit. This obfuscates the question slightly.â Kamil Maciorowski
13 mins ago