ZFS filesystems can have the aclinherit
and aclmode
properties set on them to control how inheritable ACL entries interact with object creation and Unix-style permissions operations.
Unfortunately, the official documentation is a bit cryptic/ambiguous as to exactly what the difference is between these two properties in terms of their role in computing ACLs. To illustrate, take these excerpts from Securing Files and Verifying File Integrity in Oracle® Solaris 11.3, emphasis mine:
aclinherit
– Determine the behavior of ACL inheritance...
and:
aclmode
– Modifies ACL behavior when a file is initially created or controls how an ACL is modified during achmod
operation...
This is really confusing, because ACL inheritance is going to occur or not occur when a file is initially created!
As for chmod
, the above language and some of the examples suggest that its behaviour is governed by aclmode
, but there is also an example on p.45 that shows it being governed by aclinherit
.
I have a feeling this is also complicated by variables in the APIs used to create files. (I am familiar with the Windows APIs but not *nix ones.)
I feel like even after reading through the documentation I have a rather incomplete picture of how these properties work.
What exactly is the difference between the two? They seem to have some overlap, so what governs which is applied? What if they contradict?
From the openzfs manual https://github.com/openzfs/openzfs.git
Clone repo, and
man openzfs/usr/src/man/man1m/zfs.1m