delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/03/20/12:55:58

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:content-type:content-transfer-encoding; q=dns; s=default; b=vY1
ThcqKohlYIVViWx7MCsAzAwqpZDHN4Jzy+XLCaajVcMla982lkhxGM5+CjGKrCIl
geoJ92mU2smDYwXBVdczPBeiONFAeQ03U7S8ZGw3BZ9NxnfmcdHRCniVFIyhPQGO
S/5V9c2f3Gyv5cE2R7nbr9ydUWL9PKCauLiC87B4=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:content-type:content-transfer-encoding; s=default; bh=AL4GnOvRk
EQ7z9eXArxOrhxVAak=; b=MyTlonFBGzSjCXHiQSix+VYh2F3xRdScpmJxuzIJQ
ugXNCgKsH1/4kgoWZOguo0ksrIgdo4bzwxtnFqCuGSz+BMow5bmXU0VK9tDliiMZ
cBYXovgdFS9TVWOh3rXQ5VheW3c7eqOiZe1Ij12aOw+MUesEKF/d4O7zrXDSxiL+
VU=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL,TW_YG autolearn=no version=3.3.1
Message-ID: <5149E9FF.6090409@gmail.com>
Date: Wed, 20 Mar 2013 17:55:27 +0100
From: pfx <pf DOT prologue AT gmail DOT com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: 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 AT WIN-K396JDQPSD0 /cygdrive/c/test
$ ll
total 0
d---------+ 1 patrick None 0 Mar 20 17:18 d1
patrick AT WIN-K396JDQPSD0 /cygdrive/c/test
$ ll d1/
total 0
d---------+ 1 patrick None 0 Mar 20 17:18 d2
patrick AT 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 AT 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 AT WIN-K396JDQPSD0 /cygdrive/c/test
$ mkdir sub

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

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

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

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019