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: chmod and DOS vs POSIX paths


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


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