chown in coreutils-6.2 isn't dealing with the special sticky bits correctly on directories. This is breaking src_test and compiles of several of my packages, and leading to things being installed with incorrect permissions in other cases. coreutils-5.97: # mkdir /tmp/foo ; chmod 2755 /tmp/foo ; stat /tmp/foo |grep Uid ; chmod 0755 /tmp/foo ; stat /tmp/foo | grep Uid Access: (2755/drwxr-sr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) coreutils-6.2: # mkdir /tmp/foo ; chmod 2755 /tmp/foo ; stat /tmp/foo |grep Uid ; chmod 0755 /tmp/foo ; stat /tmp/foo | grep Uid Access: (2755/drwxr-sr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: (2755/drwxr-sr-x) Uid: ( 0/ root) Gid: ( 0/ root)
e-mailed upstream as coreutils-6.3 is broken as well
this is by design unfortunately (it's in the NEWS file) and the spec even allows for it: http://www.opengroup.org/onlinepubs/009695399/utilities/chmod.html EXTENDED DESCRIPTION For an octal integer mode operand, the file mode bits shall be set absolutely. For each bit set in the octal number, the corresponding file permission bit shown in the following table shall be set; all other file permission bits shall be cleared. For regular files, for each bit set in the octal number corresponding to the set-user-ID-on-execution or the set-group-ID-on-execution, bits shown in the following table shall be set; if these bits are not set in the octal number, they are cleared. For other file types, it is implementation-defined whether or not requests to set or clear the set-user-ID-on-execution or set-group-ID-on-execution bits are honored.