Quantcast
Channel: ACLs - the same acl's on all newly created files automatically - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 4

ACLs - the same acl's on all newly created files automatically

$
0
0

I want to set ACL for eg. /tmp/test folder like this:

/tmp/test owner is user "gaspar", member of group "testgroup".
User "testuser" is also a member of group "testgroup", and I want to give rwx permissions only to this user + owner (user "gaspar").
Also I need to set the same acl for all newly created files/directories within /tmp/test automatically.

When I setfacl like this:

setfacl -Rdm u:testuser:rwx,g:testgroup:-,o::- /tmp/test/

getfacl -p /tmp/test/ gives permissions:

# file: /tmp/test/
# owner: gaspar
# group: testgroup
user::rwx
group::---
other::---
default:user::rwx
default:user:testuser:rwx
default:group::---
default:group:testgroup:---
default:mask::rwx
default:other::---

And then user "testuser" has no permissions to /tmp/test folder. Can you please suggest where the problem is, what should I correct?

When I set acl like this (without "d" option), user "testuser" has permissions as he should have, but obviously newly created files/directories don't have the same acl:

setfacl -Rm u:testuser:rwx,g:testgroup:-,o::- /tmp/test/

getfacl -p /tmp/test/

# file: /tmp/test/
# owner: gaspar
# group: testgroup
user::rwx
user:testuser:rwx
group::---
group:testgroup:---
mask::rwx
other::---

Any advice appreciated!


Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>