This is the mail archive of the
mailing list for the Cygwin project.
Re: "permission denied" issues when removing files/folders created by cygwin
- From: Roger Pack <rogerdpack2 at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 3 Sep 2015 09:10:03 -0600
- Subject: Re: "permission denied" issues when removing files/folders created by cygwin
- Authentication-results: sourceware.org; auth=none
- References: <CAL1QdWeOZvgnQtkt5tKFQtpFvynZjYL9hiUJ9d=FKGqNT7FR7w at mail dot gmail dot com> <CAOC2fq99pDSC6uta2f3bc4oCb1G5UZExK+RswaEjwutAfYN_sQ at mail dot gmail dot com> <20150901203229 dot GK23669 at calimero dot vinschen dot de>
On 9/1/15, Corinna Vinschen <firstname.lastname@example.org> wrote:
> 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:
> And then there's
> 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
> bash$ cmd /c 'del \\?\c:\cygwin64\home\corinna\nul'
Yeah this works. Windows explorer is not as clever unfortunately, so
lay users would find trouble here (my particular case is they install
a local copy of cygwin which cross compile's something for them--no
knowledge of cygwin required--but then suddenly they find they cannot
remove folders through any easy means...)
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple