7

i have tested ACL on local folders and i works perfect.

But on my zfs pool called "tank"

root@datacenter:/mnt# ls
datatank  test  webmin_1.650_all.deb
root@datacenter:/mnt# setfacl -m u:casper:rwx datatank
setfacl: datatank: Operation not supported

How can I add acl support for my zfs system ?

Whats wrong ?

12

Use

zfs set acltype=posixacl tank/datatank
0

I am fairly new to zfs, but I have just experienced this issue myself.

ZFS has 2 ACL Properties: "aclinherit" & "aclmode" , though I have been unable to get aclmode to work properly, but I think it has been recently deprecated.

Additionally, those 2 Properties have several Modes.

  • aclinherit: determines the behavior of ACL inheritance. Values include the following:

    • discard – For new objects, no ACL entries are inherited when a file or directory is created. The ACL on the file or directory is equal to the permission mode of the file or directory.
    • noallow – For new objects, only inheritable ACL entries that have an access type of deny are inherited.
    • restricted – For new objects, the write_owner and write_acl permissions are removed when an ACL entry is inherited.

    • passthrough – When property value is set to passthrough, files are created with a mode determined by the inheritable ACEs. If no inheritable ACEs exist that affect the mode, then the mode is set in accordance to the requested mode from the application.

    • passthrough-x – Has the same semantics as passthrough, except that when passthrough-x is enabled, files are created with the execute (x) permission, but only if execute permission is set in the file creation mode and in an inheritable ACE that affects the mode.

  • aclmode: (again, I was unable to get this one to work for my version, so beware!) modifies ACL behavior when a file is initially created or whenever a file or directory's mode is modified by the chmod command. Values include the following:

    • discard – All ACL entries are removed except for the entries needed to define the mode of the file or directory.

    • groupmask – User or group ACL permissions are reduced so that they are no greater than the group permission bits, unless it is a user entry that has the same UID as the owner of the file or directory. Then, the ACL permissions are reduced so that they are no greater than owner permission bits.

    • passthrough – During a chmod operation, ACEs other than owner@, group@, or everyone@ are not modified in any way. ACEs with owner@, group@, or everyone@ are disabled to set the file mode as requested by the chmod operation.

For example, you would set acl for "tank/datatank" (not your mount point, but the actual pool) this way:

zfs set "ACL-PROPERTY"="ACL-MODE" tank/datatank

more specifically

zfs set aclinherit=passthrough tank/datatank

Sources:

http://docs.oracle.com/cd/E19120-01/open.solaris/817-2271/gbaaz/index.html

https://mywushublog.com/2012/05/zfs-and-acls-with-samba/

  • 2
    aclmode does not exist on ZFS on Linux. – Michael Hampton Oct 30 '15 at 3:32
  • The ZFS on Linux manual mentions that the aclinherit property "does not apply to Posix ACLs." – CMCDragonkai Aug 4 '16 at 13:13

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.