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: rm not honoring directory access permissions

Nellis, Kenneth wrote:
I recently noticed that rm will delete a file without proper regard to the
access permissions of the containing directory. Researching the archives, I
see that this subject was touched on ("POSIX compliance of unlink(2)") in
February 2005, but the discussion seemed to veer off to a side issue (IMHO)
of updating various ctime's. So, I'm left wondering about the problem of
deleting the file. Is this a bug that ought to be fixed or what is the
rationale for maintaining the current behavior?

To remind anyone of the specific issue, consider the following in which rm
deletes (but shouldn't) file a/b:

$ mkdir a
$ touch a/b
$ chmod a-w a
$ rm a/b

I guess you missed the entire discussion on this and the subsequent
implementation.  And it turns out that the implementation has the added
bonus of being documented in the User's Guide. :-)  See the "(no)traverse"
option for the CYGWIN environment variable at:


Larry Hall                    
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
838 Washington Street                   (508) 893-9889 - FAX
Holliston, MA 01746

Unsubscribe info:
Problem reports:

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