Help: Understanding ACLs (ZFS, SMB)

i’m hoping someone can help me understand ACLs better in the context of zfs and smb.

my experience with acls has been limited to using getfacl/setfacl in linux on ext4 and btrfs to get more flexibility than the classic linux permissions give.

i just switched to openzfs on linux. i was using truenas core before, and i’m trying to figure how i want to set things up.

i have three main use cases:

  1. i run various things in docker and have different containerized apps running as different users/groups. i have them bind mount a communal ‘app ecosystem’ zfs dataset for persistent storage of large files (not their configs/dbs), and i want more granular control over fs permissions than what classic linux permissions offer.
  2. i have another dataset that i want to use for smb – mostly macOS clients. each member of my family will have his or her own account
  3. i will also have a dataset for my family’s macOS time machine backups i guess also over smb

fwiw, i am using xattr=sa and atime=off on my datasets

part of my confusion is i’ve heard of at least two acl systems: posix and nfsv4

questions:

  • when i use getfacl/setfacl in linux, what ‘system’ of acls am i using?
  • consider the zfs props documented here
    • aclinherit=discard|noallow|restricted|passthrough|passthrough-x
    • aclmode=discard|groupmask|passthrough|restricted
    • acltype=off|nfsv4|posix
    • i’ve read the man pages over and over but can’t figure out how to use these because i don’t understand the implications.
  • how might i set these zfs props, and what system of ACLs would i use for use case 1 (docker)?
  • similarly, how might i set things up for use cases 2–3 (smb)?

could someone explain this stuff to me? also, if my question is unclear, i’ll try to explain better. thanks

1 Like

First off the bat regarding acltype:

nfsv4 - The nfsv4 ZFS ACL type is not yet supported on Linux.
posix - indicates POSIX ACLs should be used. POSIX ACLs are specific to Linux and are not functional on other platforms.

This can all be translated to “only posix ACLs will work on Linux”. So that choice is easy.

Then for aclinherit:

The aclinherit property does not apply to POSIX ACLs.

So leave it as default.

NFSv4 ACLs have configurable inheritance (will copy ACLs get copied to new files). POSIX ACLs have a similar thing called “default”. I assume “default” ACLs operate the same no matter what this option is set to.

I’d leave aclmode as default, this just changes how ACLs and chmod interact.

Just a warning with SMB, Windows has yet another ACL format. So you need special options on Samba to translate SMB ACLs into Posix ACLs.

2 Likes