Confidential - Oracle Restricted \Including External Recipients

Hi, when I run recursive chmod on directory with symlinks (coreutils 9.7) on 
Solaris, I am getting "new permissions are r-xrwxrwx, not r-xr-xr-x” warning.

The simple way to reproduce this:
> mkdir test
> touch test/a
> ln -s a test/b
> /usr/gnu/bin/chmod -R -w test
chmod: test/b: new permissions are r-xrwxrwx, not r-xr-xr-x
> ls -laR test
test:
total 8
dr-xr-xr-x   2 user   group          4 Feb 25 17:55 .
drwxr-xr-x   3 user   group          3 Feb 25 17:55 ..
-r--r--r--   1 user   group          0 Feb 25 17:55 a
lr-xrwxrwx   1 user   group          1 Feb 25 17:55 b -> a

This surprised me, because 'r-xrwxrwx' is what I expected since '-w' should be 
affected by umask which is '0022' in my case, so it makes sense.

When I set the umask to 0, this doesn't happen:

> umask 0
> umask
0000
> /usr/gnu/bin/chmod -R -w test
> ls -laR test
test:
total 8
dr-xr-xr-x   2 user   group          4 Feb 25 17:57 .
drwxr-xr-x   3 user   group          4 Feb 25 17:57 ..
-r--r--r--   1 user   group          0 Feb 25 17:57 a
lr-xr-xr-x   1 user   group          1 Feb 25 17:57 b -> a


Similarly calling the chmod with a-w (which ignores umask) does not print this:

> /usr/gnu/bin/chmod -R a-w test
> ls -laR test
test:
total 8
dr-xr-xr-x   2 user   group          4 Feb 25 17:58 .
drwxr-xr-x   3 user   group          4 Feb 25 17:58 ..
-r--r--r--   1 user   group          0 Feb 25 17:58 a
lr-xr-xr-x   1 user   group          1 Feb 25 17:58 b -> a

I am unable to reproduce this on Fedora (though this might be because symlinks 
are not affected there at all and always remain 'lrwxrwxrwx')?

Should I be seeing this message in this case, or is it some unaccounted for 
platform difference?

Thank you,
Jakub



Confidential - Oracle Restricted \Including External Recipients

Reply via email to