Mike Frysinger <[EMAIL PROTECTED]> writes: > POSIX is clear on the behavior with files, but > says that it's up to specific implementations how they behave on > directories
You're quite right. Sorry, I should have been clearer that the issue is about behavior with directories, not files. > yes, POSIX allows this, but it's hard to swallow the "leading zeros are > irrelevant" logic when it gets qualified according to POSIX and becomes "when > working on a file, leading zeros are significant, but when working on > anything else, leading zeros are insignificant" I agree that it's a messy area, but the POSIX wording is not about leading zeros, it's about behavior. That is, as far as POSIX is concerned, "chmod 755 dir" and "chmod 0755 dir" are both allowed to clear the setgid bit, and they're both allowed to leave the setgid bit alone. On some implementations, the former leaves the setgid bit alone and the latter clears it; POSIX allows this. With GNU chmod, both commands leave the setgid bit alone; POSIX allows this as well. I believe that on some implementatiions, both commands clear the bit; POSIX allows this too. Sorry, but there is no consensus here, and portable scripts have to take this into account. _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
