delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/05/05/09:08:24

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <427A1A8D.7010609@byu.net>
Date: Thu, 05 May 2005 07:07:25 -0600
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
MIME-Version: 1.0
To: "Pach Roman (GS-EC/ESA4) *" <Roman DOT Pach AT de DOT bosch DOT com>
CC: cygwin AT cygwin DOT com
Subject: Re: 1.5.16-1: chmod problem
References: <C833F6C0EF3DD24DA46FADF0A87466931EA044 AT fe-mail18 DOT de DOT bosch DOT com>
In-Reply-To: <C833F6C0EF3DD24DA46FADF0A87466931EA044@fe-mail18.de.bosch.com>
X-IsSubscribed: yes

-----BEGIN PGP SIGNED MESSAGE-----
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
http://comments.gmane.org/gmane.comp.gnu.coreutils.bugs/4171, since
lists.gnu.org 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             ebb9 AT byu DOT net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCehqM84KuGfSFAYARAtXmAKC/36Pxs4ttcNkqEzy0s4UmZdEX9QCfY9dC
4I3CovmDn11kiB99fQ9rITw=
=HDIy
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019