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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=tOqLIbN8cgTmCHKQ kiMB1In9v1+sv+4DCfdxurbxc6ePOU0s0eWFQ9eI4mVb5h/MXRKGTOQze0OzIFyE 3L2Hfw6h7PjYg2D452Ukf5y16P3YV8FDhaByvWJfEQGTbTpu7SvXxdHkl0rlhLBc I3j0a+Q5H+KdWR41y/+z2LzUfgo= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=bdAYcU3brE9pvi305mBUzy Ms0NI=; b=lu/VCA6yzYose8NvkwxyutGpA/8iJ5TB0DGCr0Uj1Ml9SK9T8vz0JE jY2zGtWQzLbo1lA29T5nXgXmbMqI5uuR6mldW+dmNpYIvslexr1HwXl4ahK39x/w eQrsCy8mKdV//hy6oNYV+cPt3oHW8mFKoh0L6DUzLCFiHQsNAVkt0= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.6 required=5.0 tests=BAYES_50,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=ANNOUNCEMENT, mg, H*f:sk:announc, H*i:sk:announc X-HELO: mail-pf0-f177.google.com X-Received: by 10.98.87.204 with SMTP id i73mr40064567pfj.63.1452665873411; Tue, 12 Jan 2016 22:17:53 -0800 (PST) Subject: Re: [ANNOUNCEMENT] TEST RELEASE: Cygwin 2.4.0-0.18 To: cygwin AT cygwin DOT com References: From: random user Message-ID: <5695EC0F.7010103@gmail.com> Date: Tue, 12 Jan 2016 22:17:51 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Something I wasn't aware of at the time of our prior discussion is that the Linux NTFS-3g driver already supports Linux extended ACLs on NTFS. This is discussed at http://www.tuxera.com/community/ntfs-3g-advanced/ownership-and-permissions/ I explored taking a flash card back and forth between Cygwin 2.4.0-0.18 and a Linux system, testing how each interprets what the other wrote. I find they don't seem to interpret each other's per-group and mask permission bits correctly when creating their Posix interpretation of an NTFS ACL. I also find that somehow setting extended ACLs on Linux for a directory is causing Cygwin to then see that object as a socket, if I'm reading the below correctly. 'ls' on Cygwin won't descend into that as it normally would for a directory, bash: cd: dir_acl: Not a directory results when attempting to cd into it, etc. I don't know how common such uses are, but I do use both Cygwin and Linux on the same flash cards and external disks. If they are both going to support Posix-style extended ACLs written to NTFS, it'd seem nice if they could do so in compatible ways. Nuances re interpreting the below: - NTFS-3g usually writes full-permission ACEs for SYSTEM and Administrators. I've patched it on my system to not write those, for better compatibility with Cygwin 2.3.0 and earlier. (Per the announcement seeming to indicate those will be ignored starting in 2.4.0, perhaps I'll no longer need such patching.) - On my Cygwin machine I have distinct SIDs for a user and a group for each Windows user, simulating the "usergroup" model with ability to keep distinct permissions for the user and the group. Windows has the group defined with a _UG suffix, as shows in the icacls outputs; my /etc/group has them without the _UG suffix, as seen in the Cygwin commands input and output. The displays below such as user:julia_UG:r-- where one might more expect group:julia:r-- given the commands that created the case seem due to the way I concocted my NTFS-3g UserMapping file. I have the groups present with their _UG suffix as users in that file, along with having them listed without that suffix as groups. I suspect if I remove the user entry for the group SIDs, these would display as more expected. I don't think this represents a bug in anything other than my own UserMapping file. ############ Part 1: On Cygwin bash 1 23 # uname -a CYGWIN_NT-6.1-WOW CYGWIN 2.4.0(0.293/5/3) 2016-01-11 20:29 i686 Cygwin [0] 20:16:03 sally AT CYGWIN /e/ACL_PLAY bash 1 4 # getfacl . # file: . # owner: sally # group: sally user::rwx group::--- other:--- default:user::rwx default:group::--- default:other:--- [0] 20:17:22 sally AT CYGWIN /e/ACL_PLAY bash 1 5 # mkdir written_by_cygwin [0] 20:17:42 sally AT CYGWIN /e/ACL_PLAY bash 1 6 # cd written_by_cygwin [0] 20:17:52 sally AT CYGWIN /e/ACL_PLAY/written_by_cygwin bash 1 7 # touch file_simple [0] 20:18:02 sally AT CYGWIN /e/ACL_PLAY/written_by_cygwin bash 1 8 # touch file_acl [0] 20:18:08 sally AT CYGWIN /e/ACL_PLAY/written_by_cygwin bash 1 9 # mkdir dir_acl [0] 20:18:12 sally AT CYGWIN /e/ACL_PLAY/written_by_cygwin bash 1 10 # setfacl -m'g:julia:rwx' file_acl dir_acl [0] 20:18:29 sally AT CYGWIN /e/ACL_PLAY/written_by_cygwin bash 1 11 # chmod 740 file_acl dir_acl [0] 20:18:42 sally AT CYGWIN /e/ACL_PLAY/written_by_cygwin bash 1 12 # ls -al total 0 drwx------+ 1 sally sally 0 Jan 12 20:18 . drwx------+ 1 sally sally 0 Jan 12 20:17 .. drwxr-----+ 1 sally sally 0 Jan 12 20:18 dir_acl -rwxr-----+ 1 sally sally 0 Jan 12 20:18 file_acl -rw------- 1 sally sally 0 Jan 12 20:18 file_simple [0] 20:18:45 sally AT CYGWIN /e/ACL_PLAY/written_by_cygwin bash 1 13 # getfacl . # file: . # owner: sally # group: sally user::rwx group::--- other:--- default:user::rwx default:group::--- default:other:--- [0] 20:19:01 sally AT CYGWIN /e/ACL_PLAY/written_by_cygwin bash 1 14 # icacls . . NULL SID:(DENY)(Rc,S) CYGWIN\sally:(F) CYGWIN\sally_ug:(Rc,S,RA) Everyone:(Rc,S,RA) NULL SID:(OI)(CI)(IO)(DENY)(Rc,S) CREATOR OWNER:(OI)(CI)(IO)(F) CREATOR GROUP:(OI)(CI)(IO)(Rc,S,RA) Everyone:(OI)(CI)(IO)(Rc,S,RA) Successfully processed 1 files; Failed processing 0 files [0] 20:19:04 sally AT CYGWIN /e/ACL_PLAY/written_by_cygwin bash 1 15 # getfacl file_simple # file: file_simple # owner: sally # group: sally user::rw- group::--- other:--- [0] 20:20:28 sally AT CYGWIN /e/ACL_PLAY/written_by_cygwin bash 1 16 # icacls file_simple file_simple NULL SID:(DENY)(Rc,S) CYGWIN\sally:(R,W,D,WDAC,WO) CYGWIN\sally_ug:(Rc,S,RA) Everyone:(Rc,S,RA) Successfully processed 1 files; Failed processing 0 files [0] 20:20:37 sally AT CYGWIN /e/ACL_PLAY/written_by_cygwin bash 1 17 # getfacl file_acl # file: file_acl # owner: sally # group: sally user::rwx group::--- group:julia:rwx #effective:r-- mask:r-- other:--- [0] 20:20:46 sally AT CYGWIN /e/ACL_PLAY/written_by_cygwin bash 1 18 # icacls file_acl file_acl NULL SID:(DENY)(Rc,S,X,DC) CYGWIN\sally:(F) CYGWIN\julia_ug:(DENY)(W,X,DC) CYGWIN\sally_ug:(Rc,S,RA) CYGWIN\julia_ug:(RX,W) Everyone:(Rc,S,RA) Successfully processed 1 files; Failed processing 0 files [0] 20:20:53 sally AT CYGWIN /e/ACL_PLAY/written_by_cygwin bash 1 19 # getfacl dir_acl/ # file: dir_acl/ # owner: sally # group: sally user::rwx group::--- group:julia:rwx #effective:r-- mask:r-- other:--- default:user::rwx default:group::--- default:other:--- [0] 20:21:16 sally AT CYGWIN /e/ACL_PLAY/written_by_cygwin bash 1 20 # icacls dir_acl/ dir_acl\ NULL SID:(DENY)(Rc,S,X,DC) CYGWIN\sally:(F) CYGWIN\julia_ug:(DENY)(W,X,DC) CYGWIN\sally_ug:(Rc,S,RA) CYGWIN\julia_ug:(RX,W,DC) Everyone:(Rc,S,RA) NULL SID:(OI)(CI)(IO)(DENY)(Rc,S) CREATOR OWNER:(OI)(CI)(IO)(F) CREATOR GROUP:(OI)(CI)(IO)(Rc,S,RA) Everyone:(OI)(CI)(IO)(Rc,S,RA) Successfully processed 1 files; Failed processing 0 files ############ Part 2: On Linux bash 1 3 $ uname -a Linux LINUX 3.19.0-43-generic #49~14.04.1-Ubuntu SMP Thu Dec 31 15:44:49 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux [0] 20:28:21 sally AT LINUX ~ bash 1 1 $ cd /f/ACL_PLAY/ [0] 20:28:26 sally AT LINUX /mnt/f/ACL_PLAY bash 1 2 $ cd written_by_cygwin/ [0] 20:31:49 sally AT LINUX /mnt/f/ACL_PLAY/written_by_cygwin bash 1 16 $ ls -al total 0 drwx------+ 1 sally sally 0 Jan 12 20:18 . drwx------+ 1 sally sally 392 Jan 12 20:29 .. drwxrwx---+ 1 sally sally 0 Jan 12 20:18 dir_acl -rwxrwx---+ 1 sally sally 0 Jan 12 20:18 file_acl -rw------- 2 sally sally 0 Jan 12 20:18 file_simple [0] 20:28:44 sally AT LINUX /mnt/f/ACL_PLAY/written_by_cygwin bash 1 3 $ getfacl . * # file: . # owner: sally # group: sally user::rwx group::--- other::--- default:user::rwx default:group::--- default:other::--- # file: dir_acl # owner: sally # group: sally user::rwx user:julia_UG:r-- group::--- mask::rwx other::--- default:user::rwx default:group::--- default:other::--- # file: file_acl # owner: sally # group: sally user::rwx user:julia_UG:r-- group::--- mask::rwx other::--- # file: file_simple # owner: sally # group: sally user::rw- group::--- other::--- [0] 20:28:51 sally AT LINUX /mnt/f/ACL_PLAY/written_by_cygwin bash 1 4 $ cd .. [0] 20:40:53 sally AT LINUX /mnt/f/ACL_PLAY bash 1 3 $ mkdir written_by_linux [0] 20:40:58 sally AT LINUX /mnt/f/ACL_PLAY bash 1 4 $ cd written_by_linux/ [0] 20:41:01 sally AT LINUX /mnt/f/ACL_PLAY/written_by_linux bash 1 5 $ getfacl . # file: . # owner: sally # group: sally user::rwx group::--- other::--- default:user::rwx default:group::--- default:other::--- [0] 20:41:43 sally AT LINUX /mnt/f/ACL_PLAY/written_by_linux bash 1 6 $ touch file_simple [0] 20:41:51 sally AT LINUX /mnt/f/ACL_PLAY/written_by_linux bash 1 7 $ touch file_acl [0] 20:42:00 sally AT LINUX /mnt/f/ACL_PLAY/written_by_linux bash 1 8 $ mkdir dir_acl [0] 20:42:07 sally AT LINUX /mnt/f/ACL_PLAY/written_by_linux bash 1 9 $ setfacl -m'g:julia:rwx' file_acl dir_acl [0] 20:42:14 sally AT LINUX /mnt/f/ACL_PLAY/written_by_linux bash 1 10 $ chmod 740 file_acl dir_acl [0] 20:42:22 sally AT LINUX /mnt/f/ACL_PLAY/written_by_linux bash 1 11 $ ls -al total 0 drwx------+ 1 sally sally 352 Jan 12 20:42 . drwx------+ 1 sally sally 392 Jan 12 20:40 .. drwxr-----+ 1 sally sally 0 Jan 12 20:42 dir_acl -rwxr-----+ 1 sally sally 0 Jan 12 20:42 file_acl -rw------- 1 sally sally 0 Jan 12 20:41 file_simple [0] 20:42:30 sally AT LINUX /mnt/f/ACL_PLAY/written_by_linux bash 1 12 $ getfacl . * # file: . # owner: sally # group: sally user::rwx group::--- other::--- default:user::rwx default:group::--- default:other::--- # file: dir_acl # owner: sally # group: sally user::rwx user:julia_UG:rwx #effective:r-- group::--- mask::r-- other::--- default:user::rwx default:group::--- default:other::--- # file: file_acl # owner: sally # group: sally user::rwx user:julia_UG:rwx #effective:r-- group::--- mask::r-- other::--- # file: file_simple # owner: sally # group: sally user::rw- group::--- other::--- ############ Part 3: On Cygwin [0] 20:47:45 sally AT CYGWIN /e/ACL_PLAY/written_by_linux bash 1 34 # ls -al total 0 drwx------+ 1 sally sally 0 Jan 12 20:42 . drwx------+ 1 sally sally 0 Jan 12 20:40 .. srwxr-----+ 1 sally sally 0 Jan 12 20:42 dir_acl -rwxr-----+ 1 sally sally 0 Jan 12 20:42 file_acl -rw------- 1 sally sally 0 Jan 12 20:41 file_simple [0] 20:48:06 sally AT CYGWIN /e/ACL_PLAY/written_by_linux bash 1 35 # getfacl . # file: . # owner: sally # group: sally user::rwx group::--- other:--- default:user::rwx default:group::--- default:other:--- [0] 20:48:12 sally AT CYGWIN /e/ACL_PLAY/written_by_linux bash 1 36 # icacls . . Everyone:(OI)(IO)(DENY)(S,X) CYGWIN\sally:(NP)(F) Everyone:(NP)(Rc,S,REA,RA) CYGWIN\sally:(OI)(CI)(IO)(F) Everyone:(OI)(CI)(IO)(Rc,S,REA,RA) Successfully processed 1 files; Failed processing 0 files [0] 20:48:15 sally AT CYGWIN /e/ACL_PLAY/written_by_linux bash 1 37 # getfacl file_simple # file: file_simple # owner: sally # group: sally user::rw- group::--- other:--- [0] 20:49:24 sally AT CYGWIN /e/ACL_PLAY/written_by_linux bash 1 38 # icacls file_simple file_simple CYGWIN\sally:(NP)(R,W,D,WDAC,WO) Everyone:(NP)(Rc,S,REA,RA) Successfully processed 1 files; Failed processing 0 files [0] 20:50:51 sally AT CYGWIN /e/ACL_PLAY/written_by_linux bash 1 40 # getfacl.exe file_acl # file: file_acl # owner: sally # group: sally user::rwx group::--- group:julia:r-- mask:r-- other:--- [0] 20:49:50 sally AT CYGWIN /e/ACL_PLAY/written_by_linux bash 1 39 # icacls file_acl file_acl CYGWIN\julia_ug:(NP)(DENY)(W,Rc,WO,X) CYGWIN\sally:(NP)(M,WDAC,WO) CYGWIN\julia_ug:(NP)(RX,W) CYGWIN\sally_ug:(NP)(DENY)(W,Rc,WO,X) Everyone:(NP)(Rc,S,REA,RA) Successfully processed 1 files; Failed processing 0 files [0] 20:51:02 sally AT CYGWIN /e/ACL_PLAY/written_by_linux bash 1 41 # getfacl dir_acl # file: dir_acl # owner: sally # group: sally user::rwx group::--- group:julia:r-- mask:r-- other:--- default:user::rwx default:group::--- default:other:--- [0] 20:52:03 sally AT CYGWIN /e/ACL_PLAY/written_by_linux bash 1 42 # icacls dir_acl dir_acl CYGWIN\julia_ug:(NP)(DENY)(W,Rc,WO,X,DC) Everyone:(OI)(IO)(DENY)(S,X) CYGWIN\sally:(NP)(F) CYGWIN\julia_ug:(NP)(RX,W,DC) CYGWIN\sally_ug:(NP)(DENY)(W,Rc,WO,X,DC) Everyone:(NP)(Rc,S,REA,RA) CYGWIN\sally:(OI)(CI)(IO)(F) Everyone:(OI)(CI)(IO)(Rc,S,REA,RA) Successfully processed 1 files; Failed processing 0 files -- 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