www.delorie.com/archives/browse.cgi | search |
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:mime-version:message-id:from:to:subject | |
:content-type:date:content-transfer-encoding; q=dns; s=default; b= | |
F0ZrZJvL/GT9MVm61gnFm4SWODdFd2PtGrdGy+LknHW+lPedZPt7EAwm5E2VGzCj | |
J5d5/lybXK2IHI0EgLFT1ycUijNcKbCgK26i6XEfiSIFOoM5WYLH9gfkKL2jqlfT | |
VwzHAXDmoe/WaMgK+Ews8z4kHEveurrvx6FRD9VjFjk= | |
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:mime-version:message-id:from:to:subject | |
:content-type:date:content-transfer-encoding; s=default; bh=iEop | |
WW9ASWu4D9lYRFN+pp6bHwc=; b=NC5GdzYPAr2DdFD3wJyVGyqjnIVqP/wa0qPQ | |
6m9LmbCe90zI72zzxEYMcrGC8xGv3nlWuQhYI27J1AeIgxbyJ/UYJjaVjTjt2QG9 | |
5Fo/7oD6Q3/zpknL1JPlIQyuMJm6MNcCetIdzfmbfT+WJqyn3BOKSKFARCzzDlx+ | |
NNzCvyI= | |
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.0 required=5.0 tests=AWL,BAYES_05,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,XPRIO autolearn=no version=3.3.2 spammy=Checking, Cobb, cobb, rx |
X-HELO: | mout.gmx.net |
MIME-Version: | 1.0 |
Message-ID: | <trinity-cbf47259-7226-4e63-a653-2bbe8e064933-1453988667017@3capp-gmx-bs39> |
From: | "Rainer Blome" <rainer DOT blome AT gmx DOT de> |
To: | cygwin AT cygwin DOT com |
Subject: | chmod failed: Invalid argument [was: git clone fails with: error: chmod on config.lock failed: Invalid argument] |
Date: | Thu, 28 Jan 2016 14:44:27 +0100 |
Sensitivity: | Normal |
X-UI-Out-Filterresults: | notjunk:1;V01:K0:yLb60TmyU6s=:6cdjJE0c2h3w1Za00/oq5t I5I/tyCIQTDXZjfdq9EJrlp/r3uSHOIQMXSGpsueYlzP8O2g+A3C6FZDO2EgZFMKo8WuPCO7y hg2KFdt0nE6AalS7i5YPnR4UNISQt0XY4AvhtXDeF/Urjyqh/vnnek73MjOCL/PaHC1arP1i6 saYa4MR/JE699BKFN/1ezdjOndlZn89kNPmP/5yY/ocS2XCZREq6HwN9k3rh6kHw7MdOFGFSE G5OwBwDgUoRMUFUaV6NM8Ad/AhawpXcVTs6/DE1JqEraldR2CZvgGlhFvKDM+/QejcEVfra6k NpuCiMs7MuXNMYQHijMy9dFKQrnVlREaD+lCj2DDhJ7LqLOx4dA31uBCdcWAIUEEZgJwXwnAL WrbMnU8osPo7r7npLkQRA4eppzdeCTYqMetdwmiQ4YFqLnCKSAGIWk4R7klz+vI3PtgRriETE T2PjvcHpFw== |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id u0SDihAc019681 |
Christopher Cobb wrote on Thu, 28 Jan 2016 01:27:16 +0100: > Or maybe chmod is broken, like it is on my machine You nailed it, thanks! Indeed, `chmod` appears to always fail, on any file. Git tries to use it, and that fails. ---- cd touch foo ls -l foo -rwx------ 1 myusername 213 0 Jan 28 14:22 foo chmod u-w foo chmod: changing permissions of ‘foo’: Invalid argument ---- Corinna and Ken, thanks for your suggestions too, replies below. Rainer ===== Details recorded before I understood the chmod problem: First I created the directory manually and tried `git init`. ---- $ mkdir bar $ cd bar $ git init error: chmod on /cygdrive/c/base/bar/.git/config.lock failed: Invalid argument error: chmod on /cygdrive/c/base/bar/.git/config.lock failed: Invalid argument error: chmod on /cygdrive/c/base/bar/.git/config.lock failed: Invalid argument error: chmod on /cygdrive/c/base/bar/.git/config.lock failed: Invalid argument Initialized empty Git repository in /cygdrive/c/base/bar/.git/ ---- Looks as if the repository was created as expected: ---- $ ls -la .git total 11 drwx------+ 1 myusername 213 0 Jan 28 13:15 . drwx------+ 1 myusername 213 0 Jan 28 13:15 .. -rwx------ 1 myusername 213 36 Jan 28 13:15 config -rwx------ 1 myusername 213 73 Jan 28 13:15 description -rwx------ 1 myusername 213 23 Jan 28 13:15 HEAD drwx------+ 1 myusername 213 0 Jan 28 13:15 hooks drwx------+ 1 myusername 213 0 Jan 28 13:15 info drwx------+ 1 myusername 213 0 Jan 28 13:15 objects drwx------+ 1 myusername 213 0 Jan 28 13:15 refs $ git fsck notice: HEAD points to an unborn branch (master) Checking object directories: 100% (256/256), done. notice: No default references ---- The experiment with `git init` showns that Git can create ordinary files and directories just fine. The problem appears when Git tries to `chmod config.lock`. Sounds like a mechanism to protect `.git/config`, so let's see what happens if I try to use `git config` to modify that file: ---- git config user.email myusername AT xyz DOT org error: chmod on /cygdrive/c/base/bar/.git/config.lock failed: Invalid argument ---- That narrows it down a bit. When modifying `.git/config`, Git creates a temporary file `config.lock` and immediately tries to do `chmod 0777 config.lock` (or any other permission set), which fails. ===== On Jan 27 08:30, Ken Brown wrote: > There might be a problem with the default ACL on the directory > /cygdrive/c/base. The directory is one of my usual base directories for git repos. I have not knowingly changed any permissions or ACLs there. The experiments with `git init` above show that the base dir is not to blame, IMO. I am logged in as my usual Windows user, unchanged in years. whoami myusername > What does 'getfacl /cygdrive/c/base' show? ---- cd base getfacl . # file: . # owner: myusername # group: 213 <unknown> user::rwx user:myusername:rwx group::r-x mask:rwx other:r-x default:user::rwx default:user:myusername:rwx default:group::r-x default:mask:rwx default:other:r-x ---- ===== Corinna Vinschen wrote on Wed, 27 Jan 2016 15:53:14 +0100: > The setup of the ACL may give us a hint why git apparently > fails to create the bar subdir. I assume that Git did not fail to create the directory, it just removed it again when the clone failed. > what does the native windows icacls command print for that > directory? ---- $ icacls . . myhostname\myusername:(F) myhostname\None:(RX) Everyone:(RX) myhostname\myusername:(I)(OI)(CI)(F) Successfully processed 1 files; Failed processing 0 files ---- I assume that means that myusername has (F)ull control. -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |