Sample Header Ad - 728x90

Inheriting group write permission, but not execute for files, on OmniOS (Illumos) using ZFS ACL

3 votes
1 answer
1339 views
We operate with umask 027 most of the time. For certain directories, where multiple users are involved, I found a cool way to emulate umask 002 using ACL inheritance. Here's the command I'm using. Essentially this is chmod 775 with inheritance: /usr/bin/chmod A=owner@:rwxpDaARWcCos:fd:allow,group@:rwxpDaARWcs:fd:allow,everyone@:rxaRcs:fd:allow $@` *$@ represents the list of files to be updated. I'm using the OpenSolaris edition in /usr/bin/chmod, since /usr/gnu/bin/chmod doesn't appear to support full ACL syntax.* Works like a charm, and also sets g+s so the group name is inherited. However, there are a couple improvements I would like help with: 1. The a+x (execute) permission should only apply to directories, and should not be inherited for files automatically. 2. The o+r (read) permission should only apply to files, and *not* directories, because I want to disable ls ability for the anonymous users. *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.* Some kind of conditional inheritance is in order, inheriting one way for files, and the other way for directories. Is this possible?
Asked by 700 Software (487 rep)
Nov 30, 2016, 05:29 PM
Last activity: Dec 1, 2016, 10:21 AM