CMD.EXE able to create files in directories on a shared drive, but bash in cygwin is unable to

Keith Christian
Thu May 12 15:47:00 GMT 2011

This permissions problem has existed for awhile, and I'd like to find
a solution.

CMD.EXE is able to create files inside directories on a standard
Windows share, but from a Bash shell on Cygwin, a permission denied
message occurs, and this is in most if not all directories:

        -bash: .cpan/build/foo2: Permission denied

Below are equivalent commands run first from a CMD.EXE window, which
succeeds, and below this from a Cygwin window, where I didn't used to
have problems on this shared drive but for the past few months it's
been a problem:

CACLS used to show directory permissions.

(kchristian@some-machine) /cygdrive/z>uname -a
CYGWIN_NT-5.1 some-machine 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin

Z:\.cpan\build>cacls z:\.cpan
z:\.cpan NGT\kchristian:(OI)(CI)C

Z:\.cpan\build>cacls z:\.cpan\build
z:\.cpan\build NGT\kchristian:(OI)(CI)C
               NT AUTHORITY\SYSTEM:(OI)(CI)F

Z:\.cpan\build>echo foo > foo

Z:\.cpan\build>cacls foo
Z:\.cpan\build\foo NGT\kchristian:C
                   NT AUTHORITY\SYSTEM:F

Z:\.cpan\build>dir foo
 Volume in drive Z has no label.
 Volume Serial Number is 9E50-161B

 Directory of Z:\.cpan\build

05/12/2011  09:33 AM                 6 foo
               1 File(s)              6 bytes
               0 Dir(s)  1,174,419,517,440 bytes free

(kchristian@some-machine) /cygdrive/z>ls -dl .cpan
drwx------+ 1 Administrators Domain Users 0 Mar 22 15:10 .cpan

(kchristian@some-machine) /cygdrive/z>ls -dl .cpan/build/
drwx------+ 1 Administrators Domain Users 0 May 12 09:33 .cpan/build/

(kchristian@some-machine) /cygdrive/z>ls -dl .cpan/build/foo
-rwx------+ 1 kchristian Domain Users 6 May 12 09:33 .cpan/build/foo

(kchristian@some-machine) /cygdrive/z>echo foo2 > .cpan/build/foo2
-bash: .cpan/build/foo2: Permission denied


Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list