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]

windows 7 : files permission problem


Hi,

when I use 'cp -R' to copy files, I can't access to the target file (I have no permission on the target files)

I reproduce this problem with a fresh install of windows 7 and cygwin
my account is a user account (not admin)

from a DOS box, I create c:\test\d1\d2\test.txt

C:\>md test
C:\>cd test
C:\test>md d1
C:\test>md d1\d2
C:\test>echo test > d1\d2\test.txt

from the cygwin console

$ cd /cygdrive/c/test/
patrick@WIN-K396JDQPSD0 /cygdrive/c/test
$ ll
total 0
d---------+ 1 patrick None 0 Mar 20 17:18 d1
patrick@WIN-K396JDQPSD0 /cygdrive/c/test
$ ll d1/
total 0
d---------+ 1 patrick None 0 Mar 20 17:18 d2
patrick@WIN-K396JDQPSD0 /cygdrive/c/test
$ ll d1/d2/
total 1
----------+ 1 patrick None 7 Mar 20 17:18 test.txt

#
# Why cygwin doesn't display posix permissions ?
#

patrick@WIN-K396JDQPSD0 /cygdrive/c/test
$ cat d1/d2/test.txt
test

#
# I have no permission on d1/d2/test.txt, but I can 'CAT' it
#

#
# now, I copy the ./d1/* to ./win
#
patrick@WIN-K396JDQPSD0 /cygdrive/c/test
$ mkdir sub

patrick@WIN-K396JDQPSD0 /cygdrive/c/test
$ cp -R d1/* sub/

#
# no more posix file permission
#
patrick@WIN-K396JDQPSD0 /cygdrive/c/test
$ ll sub/
total 0
d---------+ 1 patrick None 0 Mar 20 17:21 d2

patrick@WIN-K396JDQPSD0 /cygdrive/c/test
$ ll sub/d2/
total 1
---------- 1 patrick None 7 Mar 20 17:21 test.txt

patrick@WIN-K396JDQPSD0 /cygdrive/c/test
$ cat sub/d2/test.txt
cat: sub/d2/test.txt: Permission denied
#
# but now I can acces the file from cygwin
#

I return to the DOS box

C:\test>type sub\d2\test.txt
Access is denied.

I can't read the file from windows

Of course, I have no problem with cygwin with my XP computer

Any idea ?



more tech info :

patrick@WIN-K396JDQPSD0 /cygdrive/c/test
$ getfacl.exe .
# file: .
# owner: patrick
# group: None
user::---
group::---
group:root:rwx
group:SYSTEM:rwx
group:Users:r-x
mask:rwx
other:---
default:user::---
default:group::---
default:group:root:rwx
default:group:SYSTEM:rwx
default:group:Users:r-x
default:mask:rwx
default:other:---


patrick@WIN-K396JDQPSD0 /cygdrive/c/test
$ getfacl.exe d1/d2/test.txt
# file: d1/d2/test.txt
# owner: patrick
# group: None
user::---
group::---
group:root:rwx
group:SYSTEM:rwx
group:Users:r-x
mask:rwx
other:---


patrick@WIN-K396JDQPSD0 /cygdrive/c/test
$ getfacl.exe sub/d2/test.txt
# file: sub/d2/test.txt
# owner: patrick
# group: None
user::---
group::---
mask:rwx
other:---


$ cygcheck -s
[...]
Windows 7 Home Basic N Ver 6.1 Build 7601 Service Pack 1
Running under WOW64 on AMD64
[...]
Output from C:\dev\cygwin\bin\id.exe
UID: 1005(patrick) GID: 513(None)
513(None)          545(Users)
[...]
    Cygwin DLL version info:
        DLL version: 1.7.17


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