Issues encountered with new Cygwin version

Ken Brown kbrown@cornell.edu
Sat Sep 26 22:10:00 GMT 2015


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



More information about the Cygwin mailing list