ACL Inherit passthrough-x
Mode
When aclinherit=passthrough-x
is enabled, files are created with the execute (x
) permission for owner@
, group@
, or everyone@
, but only if execute permission is set in the file creation mode and in an inheritable ACE that affects the mode.
The following example shows how to inherit the execute permission by setting the aclinherit
mode to passthrough-x
.
$ pfexec zfs set aclinherit=passthrough-x system1/cindy
The following ACL is set on /system1/cindy/test1.dir
to provide executable ACL inheritance for files for owner@
.
$ pfexec 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:50 test1.dir owner@:rwxpdDaARWcCos:fd-----:allow group@:rwxp----------:fd-----:allow everyone@:--------------:fd-----:allow
A file (file1
) is created with requested permissions 0666
. The resulting permissions are 0660
. The execution permission was not inherited because the creation mode did not request it.
$ touch test1.dir/file1 $ ls -V test1.dir/file1 -rw-rw----+ 1 root root 0 Jul 20 14:52 test1.dir/file1 owner@:rw-pdDaARWcCos:------I:allow group@:rw-p----------:------I:allow everyone@:--------------:------I:allow
Next, an executable called t
is generated by using the cc
compiler in the testdir
directory.
$ cc -o t t.c $ ls -V t -rwxrwx---+ 1 root root 7396 Dec 3 15:19 t owner@:rwxpdDaARWcCos:------I:allow group@:rwxp----------:------I:allow everyone@:--------------:------I:allow
The resulting permissions are 0770
because cc
requested permissions 0777
, which caused the execute permission to be inherited from the owner@
, group@
, and everyone@
entries.