public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* rm not honoring directory access permissions
@ 2006-06-02 18:01 Nellis, Kenneth
  2006-06-03 18:53 ` Larry Hall (Cygwin)
  0 siblings, 1 reply; 2+ messages in thread
From: Nellis, Kenneth @ 2006-06-02 18:01 UTC (permalink / raw)
  To: cygwin

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

--Ken Nellis

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: rm not honoring directory access permissions
  2006-06-02 18:01 rm not honoring directory access permissions Nellis, Kenneth
@ 2006-06-03 18:53 ` Larry Hall (Cygwin)
  0 siblings, 0 replies; 2+ messages in thread
From: Larry Hall (Cygwin) @ 2006-06-03 18:53 UTC (permalink / raw)
  To: cygwin

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:

<http://cygwin.com/cygwin-ug-net/using-cygwinenv.html>



-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
838 Washington Street                   (508) 893-9889 - FAX
Holliston, MA 01746

--
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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-03 18:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-02 18:01 rm not honoring directory access permissions Nellis, Kenneth
2006-06-03 18:53 ` Larry Hall (Cygwin)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).