Answer the question
In order to leave comments, you need to log in
Is there an alternative to setfacl in FreeBSD to use nfsv4 acl?
Good day!
There is a network sphere on samba4. The task is to set the rights so that the owner of the folder can do anything in it, and the users of the group can only view the existing information and add new information (create new directories and files), without the right to change or delete the existing ones. The network folder is located on the zfs file system with the following inheritance options:
aclmode=passthrough, aclinherit=passthrough
What is now: we set the rights to 770 on the user's directory. We go in samba - everything is visible, we can record and delete any user from the group. We add the necessary rights with the serfacl command. As before, everything works as if we did not add any rights. Create a new folder (it doesn't matter - through the console or samba). According to the FS rules, only those rights that we set with the setfacl command are inherited on the folder. The newly created folder has the rights that we need, i.e. Users in the group can add information, but cannot change or delete existing information. Now the most interesting. These are the permissions set by the chmod+setfacl command:
ls -l ./
drwxr-x---+ 6 LENCOR\test staff 6 15 янв 18:19 test
getfacl test/
# file: test/
# owner: LENCOR\test
# group: staff
[email protected]:rwxpDdaARWcCos:fdi---:allow
[email protected]:----Dd-A-W-Cos:fdi---:deny
[email protected]:rwxp--a-R-c---:fdi---:allow
[email protected]:------a-R-c---:fdi---:allow
[email protected]:rwxp--aARWcCos:------:allow
[email protected]:r-x---a-R-c--s:------:allow
[email protected]:------a-R-c--s:------:allow
ls -l test/
drwxrwx---+ 2 LENCOR\test staff 2 15 янв 18:19 222
getfacl test/222/
# file: test/222/
# owner: LENCOR\test
# group: staff
[email protected]:rwxpDdaARWcCos:fd----:allow
[email protected]:----Dd-A-W-Cos:fdi---:deny
[email protected]:rwxp--a-R-c---:fd----:allow
everyo[email protected]:------a-R-c---:fd----:allow
ls -l ./
d---------+ 2 LENCOR\test staff 2 15 янв 18:19 test
getfacl test/
# file: test/
# owner: LENCOR\test
# group: staff
[email protected]:rwxpDdaARWcCos:fd----:allow
[email protected]:----Dd-A-W-Cos:fdi---:deny
[email protected]:rwxp--a-R-c---:fd----:allow
[email protected]:------a-R-c---:fd----:allow
Answer the question
In order to leave comments, you need to log in
Figured it out myself. Permissions set by setfacl are correctly translated to ls -l unless the "inherit_only" flag has been set. Those. my policies should look NOT like:
[email protected]:rwxpDdaARWcCos:fdi---:allow
[email protected]:----Dd-A-W-Cos:fdi---:deny
[email protected]:rwxp--a-R-c---:fdi---:allow
[email protected]:------a-R-c---:fdi---:allow
[email protected]:rwxpDdaARWcCos:fd----:allow
[email protected]:----Dd-A-W-Cos:fd----:deny
[email protected]:rwxp--a-R-c---:fd----:allow
[email protected]:------a-R-c---:fd----:allow
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question