delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/06/02/13:07:53

X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Subject: rm not honoring directory access permissions
Date: Fri, 2 Jun 2006 13:05:56 -0400
Message-ID: <C874DBE9D30B584587F8CD0EC34DA8BE01B1F4E9@EX00.idirect.net>
From: "Nellis, Kenneth" <knellis AT idirect DOT net>
To: <cygwin AT cygwin DOT com>
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
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id k52H7qpA020866

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

- Raw text -


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