* "permission denied" issues when removing files/folders created by cygwin
@ 2015-09-01 19:48 Roger Pack
2015-09-01 20:05 ` Michael Enright
2015-09-03 15:32 ` Achim Gratz
0 siblings, 2 replies; 5+ messages in thread
From: Roger Pack @ 2015-09-01 19:48 UTC (permalink / raw)
To: cygwin
As a note, after using cygwin to build some libraries (worked well,
thanks team!) when trying to delete a folder via windows explorer, I
got the message "Destination folder access denied, you need to
confirm this action" (followed by a UAC prompt) and also
"Delete folder, Invalid MS-DOS function"
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.
I would not have expected cygwin to allow itself the privilege of
creating files that are unremovable by windows explorer, but I just
thought I'd throw it out there.
Cheers!
-roger-
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "permission denied" issues when removing files/folders created by cygwin
2015-09-01 19:48 "permission denied" issues when removing files/folders created by cygwin Roger Pack
@ 2015-09-01 20:05 ` Michael Enright
2015-09-01 20:32 ` Corinna Vinschen
2015-09-03 15:32 ` Achim Gratz
1 sibling, 1 reply; 5+ messages in thread
From: Michael Enright @ 2015-09-01 20:05 UTC (permalink / raw)
To: cygwin
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
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "permission denied" issues when removing files/folders created by cygwin
2015-09-01 20:05 ` Michael Enright
@ 2015-09-01 20:32 ` Corinna Vinschen
2015-09-03 15:10 ` Roger Pack
0 siblings, 1 reply; 5+ messages in thread
From: Corinna Vinschen @ 2015-09-01 20:32 UTC (permalink / raw)
To: cygwin
[-- 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 --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "permission denied" issues when removing files/folders created by cygwin
2015-09-01 20:32 ` Corinna Vinschen
@ 2015-09-03 15:10 ` Roger Pack
0 siblings, 0 replies; 5+ messages in thread
From: Roger Pack @ 2015-09-03 15:10 UTC (permalink / raw)
To: cygwin
On 9/1/15, Corinna Vinschen <corinna-cygwin@cygwin.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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "permission denied" issues when removing files/folders created by cygwin
2015-09-01 19:48 "permission denied" issues when removing files/folders created by cygwin Roger Pack
2015-09-01 20:05 ` Michael Enright
@ 2015-09-03 15:32 ` Achim Gratz
1 sibling, 0 replies; 5+ messages in thread
From: Achim Gratz @ 2015-09-03 15:32 UTC (permalink / raw)
To: cygwin
Roger Pack <rogerdpack2 <at> gmail.com> writes:
> 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.
That is likely a bug in the build system of whatever you were trying to
build, I can't think of any reason why under Cygwin it wouldn't use
/dev/null instead of NUL (that's a device name under Windows for
compatibility with DOS).
Regards,
Achim.
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-09-03 15:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-01 19:48 "permission denied" issues when removing files/folders created by cygwin Roger Pack
2015-09-01 20:05 ` Michael Enright
2015-09-01 20:32 ` Corinna Vinschen
2015-09-03 15:10 ` Roger Pack
2015-09-03 15:32 ` Achim Gratz
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).