ACL passthrough
Inherit Mode
A file system that has the aclinherit
property set to passthrough
inherits all inheritable ACL entries without any modifications made to the ACL entries when they are inherited. Files are created with a permission mode that is determined by the inheritable ACEs. If no inheritable ACEs exist that affect the permission mode, then the permission mode is set in accordance to the requested mode from the application.
Example 2-6 ACL Inheritance With ACL Inherit Mode Set to passthrough
in Verbose Mode
If the aclinherit
property on the system1/cindy
file system is set to passthrough
, then user alice
would inherit the ACL applied on test4.dir
for the newly created file.5
as follows:
$ pfexec zfs set aclinherit=passthrough system1/cindy $ touch test4.dir/file.5 $ ls -v test4.dir/file.5 -rw-r--r--+ 1 root root 0 Jul 20 14:16 test4.dir/file.5 0:user:alice:read_data/write_data/execute:inherited:allow 1:owner@:read_data/write_data/append_data/read_xattr/write_xattr /read_attributes/write_attributes/read_acl/write_acl/write_owner /synchronize:allow 2:group@:read_data/read_xattr/read_attributes/read_acl/synchronize:allow 3:everyone@:read_data/read_xattr/read_attributes/read_acl/synchronize :allow
Example 2-7 ACL Inheritance With ACL Inherit Mode Set to passthrough
in Compact Mode
The following examples use compact ACL syntax to show how to inherit permission bits by setting aclinherit
mode to passthrough
.
In this example, an ACL is set on test1.dir
to force inheritance. The syntax creates an owner@
, group@
, and everyone@
ACL entry for newly created files. Newly created directories inherit an @owner
, group@
, and everyone@
ACL entry.
$ pfbash ; zfs set aclinherit=passthrough system1/cindy $ pwd /system1/cindy $ mkdir test1.dir
$ chmod A=owner@:rwxpcCosRrWaAdD:fd:allow,group@:rwxp:fd:allow, everyone@::fd:allow test1.dir $ ls -Vd test1.dir drwxrwx---+ 2 root root 2 Jul 20 14:42 test1.dir owner@:rwxpdDaARWcCos:fd-----:allow group@:rwxp----------:fd-----:allow everyone@:--------------:fd-----:allow
In this example, a newly created file inherits the ACL that was specified to be inherited to newly created files.
$ cd test1.dir $ touch file.1 $ ls -V file.1 -rwxrwx---+ 1 root root 0 Jul 20 14:44 file.1 owner@:rwxpdDaARWcCos:------I:allow group@:rwxp----------:------I:allow everyone@:--------------:------I:allow
In this example, a newly created directory inherits both ACEs that control access to this directory as well as ACEs for future propagation to children of the newly created directory.
$ mkdir subdir.1 $ ls -dV subdir.1 drwxrwx---+ 2 root root 2 Jul 20 14:45 subdir.1 owner@:rwxpdDaARWcCos:fd----I:allow group@:rwxp----------:fd----I:allow everyone@:--------------:fd----I:allow
The fd----I
entries are for propagating inheritance and are not considered during access control.
In the following example, a file is created with a trivial ACL in another directory where inherited ACEs are not present.
$ cd /system1/cindy $ mkdir test2.dir $ cd test2.dir $ touch file.2 $ ls -V file.2 -rw-r--r-- 1 root root 0 Jul 20 14:48 file.2 owner@:rw-p--aARWcCos:-------:allow group@:r-----a-R-c--s:-------:allow everyone@:r-----a-R-c--s:-------:allow