public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Douglas Coup <dcoup@obj-sys.com>
To: cygwin@cygwin.com
Subject: Re: rm -f behavior
Date: Fri, 25 Apr 2014 14:23:00 -0000	[thread overview]
Message-ID: <535A6FF9.90004@obj-sys.com> (raw)
In-Reply-To: <20140425121614.GB5666@calimero.vinschen.de>


Objective Systems, Inc.
REAL WORLD ASN.1 AND XML SOLUTIONS
Tel: +1 (484) 875-9841
Fax: +1 (484) 875-9830
Toll-free: (877) 307-6855 (USA only)
http://www.obj-sys.com

On 4/25/2014 8:16 AM, Corinna Vinschen wrote:
> On Apr 24 18:36, Corinna Vinschen wrote:
>> On Apr 24 11:34, Douglas Coup wrote:
>>> If I do "which rm" and "which chmod", it shows that both commands
>>> resolve to the Cygwin binaries.
>>>
>>> The attached rm.notworking.trace file is from an "rm -f dac.txt"
>>> command that gets the permission denied error; i.e., when the
>>> permissions on the file are 444.  Things seem to start going south
>>> at entry 34276.
>> Gosh, how many ways to fail does transactional NTFS know?
> Btw., this is not just the result of creating the file and chmod'ing it
> to 444 in Cygwin, is it?  The reason I'm asking is that Cygwin does not
> set the DOS R/O bit when chmod'ing the file to 444.  In fact, Cygwin
> never sets the R/O bit, except for *.lnk type symlinks.
It doesn't seem to be related specifically to the chmod command.

For example, we use Perforce as our software control system.  The files 
in my Perforce workspaces that are under Perforce control are read-only 
files unless they're checked out for modification.  In Cygwin this means 
the files have a permission mask of 444 out of the box; no chmod command 
was done.  If I pick one of those files and try to do an rm -f on it, I 
get the permission denied error.  If I copy the file to a different 
name, I also get the permission denied error if I try to do an rm -f on 
it.  But if I do chmod u+w on the file, I can do the rm -f.
>
> However, this:
>
>>>     20   34002 [main] rm 7580 unlink_nt: Trying to delete \??\C:\mydocs\temp\dac.txt, isdir = 0
>>>    274   34276 [main] rm 7580 unlink_nt: Opening \??\C:\mydocs\temp\dac.txt for removing R/O failed, status = 0xC0190052
> shows that the DOS R/O bit was set.  If this attribute really showed up
> after you'd called chmod, how did it get there?!?
>
>
> Corinna
>


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

  reply	other threads:[~2014-04-25 14:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-23 20:43 Douglas Coup
2014-04-24 14:23 ` Corinna Vinschen
2014-04-24 15:35   ` Douglas Coup
2014-04-24 16:36     ` Corinna Vinschen
2014-04-24 16:45       ` Corinna Vinschen
2014-04-24 17:10       ` Douglas Coup
2014-04-25 12:16       ` Corinna Vinschen
2014-04-25 14:23         ` Douglas Coup [this message]
2014-04-25 14:50           ` Corinna Vinschen
2014-04-25 15:30             ` Douglas Coup
2014-04-25 15:47               ` Corinna Vinschen
2014-04-25 15:57                 ` Corinna Vinschen
2014-04-25 18:12                 ` Douglas Coup
2014-04-25 19:16                   ` Corinna Vinschen
2014-04-25 19:52                     ` Douglas Coup
2014-04-25 19:59                       ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=535A6FF9.90004@obj-sys.com \
    --to=dcoup@obj-sys.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).