The a+x (execute) permission should only apply to directories, and should not be inherited for files automatically.
You can specify for each ACE (access control entry) of the ACL (the complete list) how it should be inherited. The options are, taken from the Solaris admin guide, which also applies to OmniOS (Tables 8.1 to 8.3):
- file_inherit (f): Only inherit the ACL from the parent directory to the directory's files.
- dir_inherit (d): Only inherit the ACL from the parent directory to the directory's subdirectories.
- inherit_only (i): Inherit the ACL from the parent directory but applies only to newly created files or subdirectories and not the directory itself. Requires f/d/fd.
- no_propagate (n): Only inherit the ACL from the parent directory to the first-level contents of the directory, not the second-level or subsequent contents. Requires f/d/fd.
You can add multiple ACEs for the same user and achieve the desired effect, because they are combined when applying (similar to Windows ACLs). Example reduced to @owner, because for the others it would be the same:
This means that
- the first ACE is applied to the directory andis inherited for all files and directories, but excludes a+x permissions
- the second ACE is applied to the directory and is inherited for all subdirectories, but not for files and only has the a+x permissions
- to get the resulting complete ACL, you can "overlay" both lines for directories (this is why I prefer the syntax with the dashes, you see what is missing)
I have not tested that it does what you want, it sometimes depends on applications too, so you should test it. Inherited files and directory ACLs are marked with a large
I at the last position, like
The o+r (read) permission should only apply to files, and not directories, because I want to disable ls ability for the anonymous users.
Similar to the first question, but the other way round. You can also combine it with
n if you just want first-level inheritance (similar to
find -maxdepth 1). Again, take care to test because most likely the simple flags are not enough and you also need the advanced ones (
ARWC). Also, you still can apply ACLs recursively with option
chmod -R on files and directories, which may be needed in some cases (for example if ACLs should be retroactively modified, because once a file is written, its ACL is fixed, depending on the property of
I'm very pleased with OmniOS/Illumos & ZFS, but unfortunately it uses the Solaris ACL scheme which is quite different from the more commonly found Linux ACL syntax.
This may look unfortunate from your side now, but the ACLs closely model the NFSv4 ACLs, so you will not need to change anything if you decide to use NFS version 4. It also closely represents the Windows ACLs (only exception: order on SOlaris is fixed, order on Windows is always Deny before Allow, but if you do not use Deny it does not matter), which means you can edit the permissions from each Windows PC that has the
Co rights set to allowed. This works for domains and workgroups, so interoperability with Windows is better than the workarounds Samba has employed in the past.