www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/01/13/14:33:22

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <f60fe000901131132q20944860k42863c1391a371d4@mail.gmail.com>
Date: Tue, 13 Jan 2009 14:32:38 -0500
From: "Mark J. Reed" <markjreed AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: rm seems to fail
In-Reply-To: <5520d94f0901131057o3cbb3915h95b824942d95be6c@mail.gmail.com>
MIME-Version: 1.0
References: <5520d94f0901130852l310a9dfdk9821c26458d8d5e AT mail DOT gmail DOT com> <5520d94f0901130901y66a7df50yca7e586998a3bea3 AT mail DOT gmail DOT com> <5520d94f0901130916l7669d8capa39587365237da4f AT mail DOT gmail DOT com> <f60fe000901131024q5a600fc0haa6e076196c98b1e AT mail DOT gmail DOT com> <5520d94f0901131057o3cbb3915h95b824942d95be6c AT mail DOT gmail DOT com>
X-IsSubscribed: yes
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

On Tue, Jan 13, 2009 at 1:57 PM, greenup wrote:
> dz AT w2 ~
> $ rm -v goo/foo
> rm: remove write-protected regular empty file `goo/foo'? y
> removed `goo/foo'
>
> dz AT w2 ~
> $ echo $?
> 0
>
> dz AT w2 ~
> $ ls -la goo
> total 0
> drwxr-xr-x+  2 dz         mkgroup-l-d 0 Jan 13 08:10 .
> drwxrwx---+ 23 Administrators SYSTEM      0 Jan 13 10:01 ..
> -r--------   1 dz         mkgroup-l-d 0 Jan 13 08:18 foo

> obviously, LOTS AND LOTS of scripts and makefiles depend on rm -f.
> This is bad. (for me, at least)

Based on the above, the -f has nothing to do with it.   And this is
not a universal problem; rm has no trouble removing readonly files on
my Cygwin system, which is also 1.5.25.

Your cygcheck output indicates you have a C:\tools\unix\rm.exe in your
PATH; the Cygwin one is listed first by cygcheck, but it's worth
double-checking that you're executing the Cygwin one in the particular
shell environment where you're running these tests.

If it really is the Cygwin rm, it sounds like the unlink(2) call is
reporting success but not actually deleting the file.  That's easy to
check by calling unlink via a different route, e.g. perl -e
'unlink("goo/foo")' .

-- 
Mark J. Reed <markjreed AT gmail DOT com>

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

- Raw text -


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