delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/09/03/11:10:31

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; q=dns; s=default; b=fO
WfZ+suJJMcpyU8QYcOOL3lroKdfWTgDfvS0ynlUuMLPdY7NcWeF4+V7BfZoWdet1
FpmhdCgzQ/YPaOd164UuDGyjAyj7JyDVuYqcSjJAudXubIMsZNm9rGhYYn2d6E8a
LCVYe5y/ndyRY9wTVAKZTiWc+RPty2qMewCNkoRfI=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; s=default; bh=FMyJklfS
2zuvG8OaElX/fqmfF/E=; b=Y5YMHxofAxP/KUZmPTxUvwSsOXYi9oPpxuwbvYrP
02HQWrpgjY3fUChXUM3jC+DWqCI9LC+yaARK6gSIL5jGUTK3TiZNDmuiJ0WI/IeG
HWmpMfUS8zJKpEUDowH4VAp6SM+FiFETpTXgcI/a01KA2ZHR1tbkUTTud4NwMSrE
xhI=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_50,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-ig0-f171.google.com
MIME-Version: 1.0
X-Received: by 10.50.80.13 with SMTP id n13mr14047141igx.6.1441293003775; Thu, 03 Sep 2015 08:10:03 -0700 (PDT)
In-Reply-To: <20150901203229.GK23669@calimero.vinschen.de>
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>
Date: Thu, 3 Sep 2015 09:10:03 -0600
Message-ID: <CAL1QdWd=sRCXnbpVuwKogpxUOoShqrjnaTtKyPHSMjUcWXCJSw@mail.gmail.com>
Subject: 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
X-IsSubscribed: yes

On 9/1/15, Corinna Vinschen <corinna-cygwin AT cygwin DOT com> 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:
>> 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'

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...)
Cheers!

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

- Raw text -


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