From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: "permission denied" issues when removing files/folders created by cygwin
Date: Tue, 01 Sep 2015 20:32:00 -0000 [thread overview]
Message-ID: <20150901203229.GK23669@calimero.vinschen.de> (raw)
In-Reply-To: <CAOC2fq99pDSC6uta2f3bc4oCb1G5UZExK+RswaEjwutAfYN_sQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1117 bytes --]
On Sep 1 13:05, Michael Enright wrote:
> On Tue, Sep 1, 2015 at 12:48 PM, Roger Pack wrote:
> > It appears the problem lies with creating a file named "NUL" windows
> > utilities just don't know how to deal with it (you can recreate it by
> > creating a folder, then from cygwin bash $ touch NUL) then try and
> > remove the folder with windows explorer.
>
> The utilities "know" how to deal with it, given their design:
> http://blogs.msdn.com/b/oldnewthing/archive/2003/10/22/55388.aspx
And then there's
https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-dosdevices
You can create and delete those files even in CMD, btw. You just have
to use the long pathname prefix "\\?\", e.g.:
bash$ cmd /c 'echo foo > \\?\c:\cygwin64\home\corinna\nul'
bash$ ls -l nul
-rwxr-xr-x 1 corinna vinschen 6 Sep 1 22:30 nul
delete with
bash$ rm nul
or
bash$ cmd /c 'del \\?\c:\cygwin64\home\corinna\nul'
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-09-01 20:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 19:48 Roger Pack
2015-09-01 20:05 ` Michael Enright
2015-09-01 20:32 ` Corinna Vinschen [this message]
2015-09-03 15:10 ` Roger Pack
2015-09-03 15:32 ` Achim Gratz
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=20150901203229.GK23669@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.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).