delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/01/25/14:55:47

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Mon, 25 Jan 2010 20:55:28 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: chmod and DOS vs POSIX paths
Message-ID: <20100125195528.GR2402@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <27307971 DOT post AT talk DOT nabble DOT com> <20100125160534 DOT GO2402 AT calimero DOT vinschen DOT de> <27312068 DOT post AT talk DOT nabble DOT com>
MIME-Version: 1.0
In-Reply-To: <27312068.post@talk.nabble.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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

http://cygwin.com/acronyms/#TOFU

On Jan 25 11:25, brassrat wrote:
> 
> I agree that the having an R/O attribute conflicts with the concept of ACLS; 
> however, it is not true that the chmod command does not change this flag.
> For example, 
> if you chmod +w a file with the R/O flag 'set' the R/O flag is reset.
> (maybe this is a side-effect of the ACL-based processing within windows?)

No, it's deliberate.  The R/O flag is in the way(*).  It's not a concept
known in POSIX and POSIX permissions are represented by matching ACEs
much better.

> so the current behavior is somewhat inconsistent, especially given that
> chmod works differently depending upon whether it is 'given' a DOS or a
> POSIX path.

That's a side-effect of the DOS path handling.  DOS paths are handled
as noacl paths, as described in the User's Guide.  Thus DOS paths are
always handled same as FAT/FAT32 filesystems, even when pointing to NTFS.

> from a cygwin/posix perspective, doesn't 'chmod a-w FILE' mean that the file
> should not writable? and doesn't setting the 'r/o flag' (if supported by the
> underlying file system) capture this concept better than some combination of
> acl entries?

No.  If you look into the ACEs representing the POSIX permissions you'll
see why.


Corinna

(*) For instance, it breaks admin backup/restore permissions and requires
    special handling in calls to open(2).

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

- Raw text -


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