I think I might have found a bug regarding the new behavior of chmod
(regarding the preservation of setuig, setgid, etc) in coreutils-6.9.
My understanding is that the new behavior should preserve these bits if
they are not explicitly specified, and this appears to work correctly:
$ mkdir foo
$ ls -ld foo
drwxr-xr-x 2 cell dept 4096 Oct 2 13:46 foo
$ chmod g+s foo
$ ls -ld foo
drwxr-sr-x 2 cell dept 4096 Oct 2 13:46 foo
$ chmod 755 foo
$ ls -ld foo
drwxr-sr-x 2 cell dept 4096 Oct 2 13:46 foo
However, the problem exists for the case where a user *does* explicitly
specify what those bits should be. chmod respects those bits while
setting them:
$ mkdir foo
$ ls -ld foo
drwxr-xr-x 2 cell dept 4096 Oct 2 13:40 foo
$ chmod 2755 foo
$ ls -ld foo
drwxr-sr-x 2 cell dept 4096 Oct 2 13:40 foo
but ignores them when the user attempts to clear them:
$ chmod 0755 foo
$ ls -ld foo
drwxr-sr-x 2 cell dept 4096 Oct 2 13:40 foo
However, using the symbolic instead of octal notation works correctly:
$ chmod g-s foo
$ ls -ld foo
drwxr-xr-x 2 cell dept 4096 Oct 2 13:40 foo
Is there any way to clear the setgid bit using octal notation?
-jason
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils