This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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



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


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


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


Z:\.cpan\build>cacls foo
Z:\.cpan\build\foo NGT\kchristian:C
                   BUILTIN\Administrators:F
                   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




==========BASH/CYGWIN==========
===============================
(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



======Keith

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]