please test: coreutils-5.90-2

Eric Blake
Wed Oct 12 03:20:00 GMT 2005

Hash: SHA1

According to David Rothenberger on 10/11/2005 4:13 PM:
> I'm having another problem with 'mkdir -p' in 5.90-2.
> I have a script that attempts to do "mkdir -p c:/dir1/dir2/dir3". This
> started failing with a permission denied error for c:/.

Hmm.  It worked perfectly for me on Win98, on both local and remote
drives.  But on WinXP, I got different behavior for the remote FAT than I
did for the local NTFS:

$ df -T c: j:
Filesystem    Type   1K-blocks      Used Available Use% Mounted on
c:    system,fixed    29286460  20471796   8814664  70% /cygdrive/c
j:   system,remote     6260992   4508800   1752192  73% /cygdrive/j
$ mkdir -p j:/dir
$ mkdir -p c:/dir
mkdir: cannot create directory `c:': Permission denied

I am suspecting a cygwin bug here.  mkdir("c:") should fail with EEXIST,
not EACCES.  5.90 exposes this bug, where 5.3.0 did not, because the
algorithm for mkdir -p was changed to attempt mkdir() first instead of stat().

Continuing the example, I also find it odd that from WinXP, I get EBADRQC
instead of the more familiar ENOENT when removing a nonexistant directory
on a remote FAT drive:

$ rmdir j:/dir
$ rmdir j:/dir
rmdir: j:/dir: Invalid request code
$ rmdir c:/dir
rmdir c:/dir: No such file or directory

- --
Life is short - so eat dessert first!

Eric Blake   
volunteer cygwin coreutils maintainer
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Thunderbird -


Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list