delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/09/04/14:26:41

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=d7yCX6EcR7F4WmMC
t0oBNMeBh0miEHJntk6dpPk4m+i6yh2zooigiBrcetcXDpdb7tIFOxvmVmFu1KSc
qKDolN/9u0l+NKc79Ayk5zLjF2W8LkHGCzHaTiMlCxlhgQKOXwTnaZ5AAdJImbhr
xVdrTC94CXvIAqty/xkRMG8xB7g=
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=nAK1F1UdcDduTx6Xp++HVP
EDW/k=; b=mUBiLu27bWwWugDMAUPfT6rAxtsqBoFoo3Vruo/VVwwlFGNhZ1G7EU
wjlDJnpOtUte1yNz7nHIH6kwbEz8b7jjJvp1UTnynagyQuuk+OmfDHPbVvXNCGIs
YjY7MRNKoFBevrBcS/C/JK7H/gAokCZVoMdBOmc7bvusGRgn4fz4U=
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=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2
X-HELO: limerock02.mail.cornell.edu
X-CornellRouted: This message has been Routed already.
Subject: Re: Problem with git and file mode changes
To: cygwin AT cygwin DOT com
References: <CAH8Pv0jXEEJ5P4jmojYne_SAt-DtK7twGLuujFCukoAhr1-f8g AT mail DOT gmail DOT com> <20150904151229 DOT GB14466 AT dinwoodie DOT org>
From: Ken Brown <kbrown AT cornell DOT edu>
Message-ID: <55E9E24A.3000204@cornell.edu>
Date: Fri, 4 Sep 2015 14:26:18 -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: <20150904151229.GB14466@dinwoodie.org>
X-IsSubscribed: yes

On 9/4/2015 11:12 AM, Adam Dinwoodie wrote:
> On Fri, Sep 04, 2015 at 04:44:11PM +0200, Dani Moncayo wrote:
>> After doing a 'git pull', I saw that git didn't make the merge,
>> because apparently I had some local changes.  But I didn't make
>> any local change.  For example, this file appears as modified:
>>
>>    $ git status --short test/rmailmm.el
>>     M test/rmailmm.el
>>
>>    $ git diff test/rmailmm.el
>>    diff --git a/test/rmailmm.el b/test/rmailmm.el
>>    old mode 100644
>>    new mode 100755
>>
>> Mmm strange, I never changed the permissions of any file in my
>> repo.  And moreover:
>>
>>    $ ls -o test/rmailmm.el
>>    -rwxrwxr--+ 1 Dani 3106 Sep 4 16:19 test/rmailmm.el
>>
>> According to 'ls', the file mode is 774, but according to git is
>> 755.  Which one is wrong?
>
> Git internally only stores file permissions of 755 or 644*; anything
> else is mapped down to one of those two, based (I believe) on whether
> the user execute bit is set or not.
>
>> Well, let's try to revert the misterious change:
>>
>>    $ git checkout test/rmailmm.el
>>
>>    $ git status --short test/rmailmm.el
>>     M test/rmailmm.el
>>
>>    $ git diff test/rmailmm.el
>>    diff --git a/test/rmailmm.el b/test/rmailmm.el
>>    old mode 100644
>>    new mode 100755
>>
>>    $ ls -o test/rmailmm.el
>>    -rwxrwxr--+ 1 Dani 3106 Sep  4 16:28 test/rmailmm.el
>>
>> Apparently nothing has changed after the 'git checkout'!!
>
> It looks like the underlying file system is failing to record the file
> permissions correctly**.  That could be a limitation of the file system
> (FAT32 is much more limited than NTFS, for example, and I could believe
> permissions go very wrong over network shares), of the options with
> which the filesystem is mounted in Cygwin (take a look for "noacl" in
> the Cygwin FAQs), or possibly just that you don't have permission to
> change the file properties (although I'd expect an error in that
> scenario).  Another option is that some non-Cygwin program is getting in
> the way and interfering with the permissions.

This could also be a result of default ACL entries on the directory 
'test'.  Dani, you might want to try 'setfacl -b test' and/or 'setfacl 
-k test'.  ('setfacl -h' will give you more information.)

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