This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 1.5.16-1: chmod problem

Hash: SHA1

According to Pach Roman (GS-EC/ESA4) * on 5/3/2005 10:53 PM:
> I admit I'm stubborn about this topic but I'd like to propose 
> the change of chmod implementation.
> I thing, it would be nice if the 'chmod +/-w' would have in the discussed case the same
> functionality as the Windows' command 'attrib'.

It isn't going to happen at the coreutils level on chmod(1).  POSIX
requires that `chmod -- -w file' be valid (-w is treated as the mode
argument, not an option), and that it remove only those write permissions
which would be granted by creat() given the current umask, making it
behave differently than `chmod a-w file' which removes all write
permissions.  But there was a discussion on the bug-coreutils list just
this week (see, since is still down following the FSF office move) how POSIX
allows `chmod -w file' or `chmod -w -- file' as an extension (here, -w is
an option, and POSIX only specifies the -R option), and in CVS, it was
just changed so that `chmod -w file' will do what `chmod -- -w file' is
required to do, but print a warning if that action is different than what
`chmod a-w file' would do.  So, even though we could define whatever
behavior we wanted for the -w option to chmod, I am not going to define it
differently for cygwin that what upstream has defined it to be, based on
what POSIX defines.

That's not to say that Corinna's changes to chmod(2) might affect your
situation, so do give the latest cygwin snapshot a try.  And meanwhile, if
Windows attrib has the semantics you want, then use Windows attrib.

- --
Life is short - so eat dessert first!

Eric Blake   
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Thunderbird -


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]