[illumos-Advocates] RTI 948 chmod(1M) is not -R friendly when doing ACLs

Yuri Pankov yuri.pankov at gmail.com
Wed May 11 21:02:01 PDT 2011


On Wed, May 11, 2011 at 11:55:10PM -0400, Gordon Ross wrote:
> Could you  please add a test case with "chmod -fR" also?
> (add a test using the "-f" option).  Otherwise looks good.

Original:

illumos:yuri:~$ mkdir -p a/b/c/d; /usr/bin/chmod \
  A+user:yuri:full_set:allow a/b; /usr/bin/chmod \
  A=user:root:full_set:allow a/b/c; /usr/bin/chmod -fR \
  A-user:yuri:full_set:allow a; printf "error=%d\n" $?; \
  /usr/bin/ls -Vd a/b
chmod: ERROR: ACL entry doesn't exist
error=0
drwxr-xr-x+  3 yuri     staff          3 May 12 07:58 a/b
              user:yuri:rwxpdDaARWcCos:-------:allow
                 owner@:rwxp--aARWcCos:-------:allow
                 group@:r-x---a-R-c--s:-------:allow
              everyone@:r-x---a-R-c--s:-------:allow


Modified:
llumos:yuri:~$ mkdir -p a/b/c/d; \
  ~/ws/948-chmod-r-acl/usr/src/cmd/chmod/chmod A+user:yuri:full_set:allow \
  a/b; ~/ws/948-chmod-r-acl/usr/src/cmd/chmod/chmod \
  A=user:root:full_set:allow a/b/c; \
  ~/ws/948-chmod-r-acl/usr/src/cmd/chmod/chmod -fR \
  A-user:yuri:full_set:allow a; printf "error=%d\n" $?; \
  /usr/bin/ls -Vd a/b
error=0
drwxr-xr-x   3 yuri     staff          3 May 12 07:59 a/b
                 owner@:rwxp--aARWcCos:-------:allow
                 group@:r-x---a-R-c--s:-------:allow
              everyone@:r-x---a-R-c--s:-------:allow


Yuri



More information about the Advocates mailing list