From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18209 invoked by alias); 28 Aug 2014 07:25:26 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 18197 invoked by uid 89); 28 Aug 2014 07:25:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.5 required=5.0 tests=AWL,BAYES_05,FSL_HELO_BARE_IP_2,RCVD_IN_DNSWL_LOW,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 X-HELO: plane.gmane.org Received: from plane.gmane.org (HELO plane.gmane.org) (80.91.229.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 28 Aug 2014 07:25:23 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XMu59-0007si-En for cygwin@cygwin.com; Thu, 28 Aug 2014 09:25:19 +0200 Received: from 217.10.52.10 ([217.10.52.10]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 Aug 2014 09:25:19 +0200 Received: from Stromeko by 217.10.52.10 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 Aug 2014 09:25:19 +0200 To: cygwin@cygwin.com From: Achim Gratz Subject: Re: (call-process ...) hangs in emacs Date: Thu, 28 Aug 2014 07:25:00 -0000 Message-ID: References: <20140805184047.GC13601@calimero.vinschen.de> <53E3685B.8050508@cornell.edu> <53E39BAD.3010004@redhat.com> <53E3CB46.1020909@cornell.edu> <53E3F2AE.7030608@redhat.com> <53E4D01B.9010005@cornell.edu> <53F1F154.1020702@cornell.edu> <53FB87DC.2050908@cornell.edu> <87wq9v9j2y.fsf@Rainer.invalid> <53FD0662.5050208@cornell.edu> <20140827084245.GD20700@calimero.vinschen.de> <53FDD4A8.5050401@cornell.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00542.txt.bz2 Achim Gratz NexGo.DE> writes: > Let's get one issue out of the way first that may be a Cygwin bug: on Linux > a file with all access removed via standard POSIX modes and then access > granted via ACL would place the mask bits of the ACL (the maximum permission > that can be granted via ACL, usually rwx) into the group portion of the > POSIX modes (ls --color would even show these in different color if you > didn't happen to notice the "+"). That doesn't happen on Cygwin and it > seems that some software optimizes based on that information to not traverse > the ACL when there's no chance to ever get a permission granted. This > behaviour is mandated by POSIX IIUC (and it is what Linux is doing) so > unless Cygwin explicitly follows a different ACL model, I think that should > be taken care of before diving into this further. As a concrete example, in the following the directory x86 shows up on Cygwin as follows: > getfacl x86 # file: x86 # owner: otheruser # group: Domain Users user::--- group::--- group:FilerAdmins:rwx group:ShareOwners:rwx mask:rwx other:--- default:user::--- default:group::--- default:group:FilerAdmins:rwx default:group:ShareOwners:rwx default:mask:rwx default:other:--- > ls -ld x86 d---------+ 1 otheruser Domain Users 0 Jun 23 14:09 x86/ Under Linux in the same situation you'd get > ls -ld x86 d---rwx---+ 1 otheruser Domain Users 0 Jun 23 14:09 x86/ instead (i.e. the mask bits shown in the group portion of the standard mode flags). If the file was owned by your uid, then you'd get indeed > ls -ld x86 d---------+ 1 myself Domain Users 0 Jun 23 14:09 x86/ but you'd also really have no permissions. On Windows you do have permission to the file in that situation since the POSIX part of the ACL (particularly the user::--- part that revokes all access for the file owner) are faked by Cygwin and not taken into account when the file gets finally accessed: > icacls x86 x86 DOM\FilerAdmins:(I)(OI)(IO)(F) DOM\FilerAdmins:(I)(CI)(F) DOM\ShareOwners:(I)(OI)(IO)(M) DOM\ShareOwners:(I)(CI)(M) If getting at the correct mask is too expensive, simply always faking an "rwx" mask might actually be better than what we have now, since once the ACL are fully processed you'll get the correct permissions anyway. Regards, Achim. -- 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