On Wednesday 03 October 2007, Paul Eggert wrote:
> Jason Pepas <address@hidden> writes:
> > was there a reason for this? I hardly think someone would put a
> > leading octal 0 in by mistake...
>
> This came up in previous discussion, and the consensus at the time is
> that leading zeros should not matter, just as they don't matter in
> ordinary numeric representation. Other implementations disagree with
> each other on this matter. Obviously there is no standard in this
> area, so portable scripts shouldn't rely on any particular behavior
> for "0755".
well, it is and it isnt ... POSIX is clear on the behavior with files, but
says that it's up to specific implementations how they behave on
directories ... it seems inconsistent to me that doing:
chmod 0755 file
behaves differently than:
chmod 0755 directory
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"
-mike
signature.asc Description: This is a digitally signed message part.