delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/09/26/18:10:47

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=JYRqTIMYZUi3KbLz
MmRDwdd8RI/hwfrY1VSjKW0rDqG6DTRAi/ROh21Eaq/FoXge0eDA2nAQTR4a0iYd
TZkeTHsbXZbfrFZZ1Oy37IfZGjPnvE4pcz8GtkfID0BvlrABBkukDpjx0fZ9q4eR
X4RWuoPqcwAEuKKrR939G9QnojQ=
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=Xh+g0Z/8wVyOAdmQxsO1Ib
jHeU0=; b=gdnfpbWv70P3fdudLBbyOQF/99oj+zOaNFwiS5p8Sbo86SGdUe2U40
9f7hbggPx8IhTkU8CDS6Dmt9McxY+Aj06Ct2RqDSC/CgkmbTIT9zTsdCWeML4F0i
Gg832YnlDpJ6v3YMJV2Bdb+3P3NhPI6UkQ7B7KgsP/UI4Vl40st0E=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2
X-HELO: limerock01.mail.cornell.edu
X-CornellRouted: This message has been Routed already.
Subject: Re: Issues encountered with new Cygwin version
To: cygwin AT cygwin DOT com
References: <BLU182-W10FB6B21A2AEC90F71470FD4450 AT phx DOT gbl> <154887677 DOT 20150923111537 AT yandex DOT ru> <BLU182-DS2B4F831FEB7E4C1B67330D4440 AT phx DOT gbl> <56036256 DOT 8080209 AT tlinx DOT org> <BLU182-DS2567923242507AF88D9315D4430 AT phx DOT gbl> <56037F66 DOT 40209 AT tlinx DOT org> <BLU182-DS177F609D3B4BC69A880C77D4430 AT phx DOT gbl> <56042985 DOT 2040104 AT tlinx DOT org> <BLU182-DS23E73EC671521B950E6875D4420 AT phx DOT gbl> <1275666051 DOT 20150926120518 AT yandex DOT ru> <BLU182-DS1484E63B23E4228B1C49B4D4410 AT phx DOT gbl>
From: Ken Brown <kbrown AT cornell DOT edu>
Message-ID: <560717D5.5010201@cornell.edu>
Date: Sat, 26 Sep 2015 18:10:29 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0
MIME-Version: 1.0
In-Reply-To: <BLU182-DS1484E63B23E4228B1C49B4D4410@phx.gbl>
X-IsSubscribed: yes

On 9/26/2015 4:26 PM, Walter L. wrote:
> On 9/26/2015 5:05 AM, Andrey Repin wrote:
>
>> Greetings, Walter L.!
>>
>> > This is very unfortunate because I'm using Git in Cygwin specifically
>> > because it doesn't set the executable bit like Windows applications.
>>
>> This is, you know, configurable?...
>
> Which part? Git or Cygwin? You mean I can configre Cygwin to prevent Git from
> creating files that inherit the executable bit from the ACL?

I don't mean to be nit-picking, but the way you phrased this questions suggests 
that you have some misconceptions about what's going on here.  There are two 
separate issues:

1. Starting with Cygwin 1.7.34, the "group permissions" of a file reflect not 
only the permissions of the primary group of the file, but also all secondary 
user and group entries in the file's ACL.  This is explained in

   https://cygwin.com/faq/faq.html#faq.using.ssh-pubkey-stops-working

in the context of ssh, but it applies equally well to your situation.

So if you're seeing an unexpected executable permission, it's because the file 
has an ACL entry giving executable permission to some user or group other than 
the primary ones.  You can see these ACL entries by running getfacl on the file. 
  A typical example is "group:Administrators:rwx", which occurred in some of the 
ACLs in my earlier email.

2. If the directory has *default* ACL entries, then these entries, by default, 
will be inherited by files created in that directory (by Git or any other 
application).  Looking at my earlier email again, you'll see some directories 
with ACL entries "default:group:Administrators:rwx", causing the entry 
"group:Administrators:rwx" to be inherited by files created in those 
directories.  As explained above, this causes rwx permissions to show up as 
"group permissions" of the file.

In your situation, you are working in a directory that, for whatever reason, 
contains such default ACL entries.  If you don't want files created in that 
directory to inherit the corresponding entries, then you need to get rid of 
those unwanted default ACL entries.  The simplest way is to run 'setfacl -b' on 
the directory, as explained in the FAQ cited above and in my earlier email.

None of this is special to Git or to executable permission.

Ken

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