From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116937 invoked by alias); 3 Sep 2015 15:10:12 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 116921 invoked by uid 89); 3 Sep 2015 15:10:10 -0000 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 Received: from mail-ig0-f171.google.com (HELO mail-ig0-f171.google.com) (209.85.213.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 03 Sep 2015 15:10:06 +0000 Received: by igbni9 with SMTP id ni9so42217211igb.0 for ; Thu, 03 Sep 2015 08:10:04 -0700 (PDT) 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) Received: by 10.107.14.130 with HTTP; Thu, 3 Sep 2015 08:10:03 -0700 (PDT) In-Reply-To: <20150901203229.GK23669@calimero.vinschen.de> References: <20150901203229.GK23669@calimero.vinschen.de> Date: Thu, 03 Sep 2015 15:10:00 -0000 Message-ID: Subject: Re: "permission denied" issues when removing files/folders created by cygwin From: Roger Pack To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00059.txt.bz2 On 9/1/15, Corinna Vinschen 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