public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* git clone fails with: error: chmod on config.lock failed: Invalid argument
@ 2016-01-27 16:34 Rainer Blome
  2016-01-27 18:33 ` Ken Brown
  0 siblings, 1 reply; 19+ messages in thread
From: Rainer Blome @ 2016-01-27 16:34 UTC (permalink / raw)
  To: cygwin

Hi!

When I use "git clone foo bar" on a Linux host, it works as expected.

 git clone foo bar
 Cloning into 'bar'...
 done.

When I use the same command on my Cygwin 64 installation, this used
to work, but does not work any more.  I can fetch and otherwise use
Git in existing repos all right (have not noticed anything else
amiss), but the clone command fails like this:

----
cd /cygdrive/c/base
git clone foo bar
Cloning into 'bar'...
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
error: chmod on /cygdrive/c/base/bar/.git/config.lock failed: Invalid argument
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
----

Directory `bar` exists neither before nor after the attempted cloning.
In the parent directory, manually creating a subdirectory works as
expected:

 /cygdrive/c/base> mkdir bar; ls -ld bar; rmdir bar
 drwx------+ 1 username 123 0 Jan 27 13:13 bar

The issue is not restricted to local cloning, the same messages are
printed when I attempt to clone from a remote host (from which I
can clone just fine from a Linux client).

Searching the internet for "cygwin git error chmod on config.lock
failed: Invalid argument" gave not useful results.

I first noticed the issue after having upgraded to Cygwin 2.4.0-1.
Juding from the directory creation times in `base`,
it looks like the last successful clone happened on 2015-07-28.
I do not know which version of Cygwin I used at that time,
I update roughly once a month.

Today, I upgraded to 2.4.1-1, the issue persists.

I tried downgrading git from 2.7 to 2.6 via the installer.
The issue persisted, so I rolled forward again, the issue persisted.

How can I troubleshoot this further?

Rainer

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: git clone fails with: error: chmod on config.lock failed: Invalid argument
  2016-01-27 16:34 git clone fails with: error: chmod on config.lock failed: Invalid argument Rainer Blome
@ 2016-01-27 18:33 ` Ken Brown
  2016-01-27 18:39   ` Corinna Vinschen
  0 siblings, 1 reply; 19+ messages in thread
From: Ken Brown @ 2016-01-27 18:33 UTC (permalink / raw)
  To: cygwin

On 1/27/2016 7:41 AM, Rainer Blome wrote:
> Hi!
>
> When I use "git clone foo bar" on a Linux host, it works as expected.
>
>   git clone foo bar
>   Cloning into 'bar'...
>   done.
>
> When I use the same command on my Cygwin 64 installation, this used
> to work, but does not work any more.  I can fetch and otherwise use
> Git in existing repos all right (have not noticed anything else
> amiss), but the clone command fails like this:
>
> ----
> cd /cygdrive/c/base
> git clone foo bar
> Cloning into 'bar'...
> 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
> error: chmod on /cygdrive/c/base/bar/.git/config.lock failed: Invalid argument
> fatal: 'origin' does not appear to be a git repository
> fatal: Could not read from remote repository.
>
> Please make sure you have the correct access rights
> and the repository exists.
> ----
>
> Directory `bar` exists neither before nor after the attempted cloning.
> In the parent directory, manually creating a subdirectory works as
> expected:
>
>   /cygdrive/c/base> mkdir bar; ls -ld bar; rmdir bar
>   drwx------+ 1 username 123 0 Jan 27 13:13 bar
>
> The issue is not restricted to local cloning, the same messages are
> printed when I attempt to clone from a remote host (from which I
> can clone just fine from a Linux client).
>
> Searching the internet for "cygwin git error chmod on config.lock
> failed: Invalid argument" gave not useful results.
>
> I first noticed the issue after having upgraded to Cygwin 2.4.0-1.
> Juding from the directory creation times in `base`,
> it looks like the last successful clone happened on 2015-07-28.
> I do not know which version of Cygwin I used at that time,
> I update roughly once a month.
>
> Today, I upgraded to 2.4.1-1, the issue persists.
>
> I tried downgrading git from 2.7 to 2.6 via the installer.
> The issue persisted, so I rolled forward again, the issue persisted.
>
> How can I troubleshoot this further?

There might be a problem with the default ACL on the directory 
/cygdrive/c/base.  What does 'getfacl /cygdrive/c/base' show?

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: git clone fails with: error: chmod on config.lock failed: Invalid argument
  2016-01-27 18:33 ` Ken Brown
@ 2016-01-27 18:39   ` Corinna Vinschen
  2016-01-28  6:35     ` Christopher Cobb
  0 siblings, 1 reply; 19+ messages in thread
From: Corinna Vinschen @ 2016-01-27 18:39 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 2840 bytes --]

On Jan 27 08:30, Ken Brown wrote:
> On 1/27/2016 7:41 AM, Rainer Blome wrote:
> >Hi!
> >
> >When I use "git clone foo bar" on a Linux host, it works as expected.
> >
> >  git clone foo bar
> >  Cloning into 'bar'...
> >  done.
> >
> >When I use the same command on my Cygwin 64 installation, this used
> >to work, but does not work any more.  I can fetch and otherwise use
> >Git in existing repos all right (have not noticed anything else
> >amiss), but the clone command fails like this:
> >
> >----
> >cd /cygdrive/c/base
> >git clone foo bar
> >Cloning into 'bar'...
> >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
> >error: chmod on /cygdrive/c/base/bar/.git/config.lock failed: Invalid argument
> >fatal: 'origin' does not appear to be a git repository
> >fatal: Could not read from remote repository.
> >
> >Please make sure you have the correct access rights
> >and the repository exists.
> >----
> >
> >Directory `bar` exists neither before nor after the attempted cloning.
> >In the parent directory, manually creating a subdirectory works as
> >expected:
> >
> >  /cygdrive/c/base> mkdir bar; ls -ld bar; rmdir bar
> >  drwx------+ 1 username 123 0 Jan 27 13:13 bar
> >
> >The issue is not restricted to local cloning, the same messages are
> >printed when I attempt to clone from a remote host (from which I
> >can clone just fine from a Linux client).
> >
> >Searching the internet for "cygwin git error chmod on config.lock
> >failed: Invalid argument" gave not useful results.
> >
> >I first noticed the issue after having upgraded to Cygwin 2.4.0-1.
> >Juding from the directory creation times in `base`,
> >it looks like the last successful clone happened on 2015-07-28.
> >I do not know which version of Cygwin I used at that time,
> >I update roughly once a month.
> >
> >Today, I upgraded to 2.4.1-1, the issue persists.
> >
> >I tried downgrading git from 2.7 to 2.6 via the installer.
> >The issue persisted, so I rolled forward again, the issue persisted.
> >
> >How can I troubleshoot this further?
> 
> There might be a problem with the default ACL on the directory
> /cygdrive/c/base.  What does 'getfacl /cygdrive/c/base' show?

Also, what does the native windows icacls command print for that
directory?  The setup of the ACL may give us a hint why git apparently
fails to create the bar subdir.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: git clone fails with: error: chmod on config.lock failed: Invalid argument
  2016-01-27 18:39   ` Corinna Vinschen
@ 2016-01-28  6:35     ` Christopher Cobb
  2016-01-28 14:31       ` Corinna Vinschen
  2016-01-28 14:33       ` git clone fails with: error: " Andrey Repin
  0 siblings, 2 replies; 19+ messages in thread
From: Christopher Cobb @ 2016-01-28  6:35 UTC (permalink / raw)
  To: cygwin

Or maybe chmod is broken, like it is on my machine:

$ touch x
$ chmod 777 x
chmod: changing permissions of ‘x’: Invalid argument

> Sent: Wednesday, January 27, 2016 at 9:53 AM
> From: "Corinna Vinschen" <corinna-cygwin@cygwin.com>
> To: cygwin@cygwin.com
> Subject: Re: git clone fails with: error: chmod on config.lock failed: Invalid argument
>
> On Jan 27 08:30, Ken Brown wrote:
> > On 1/27/2016 7:41 AM, Rainer Blome wrote:
> > >Hi!
> > >
> > >When I use "git clone foo bar" on a Linux host, it works as expected.
> > >
> > >  git clone foo bar
> > >  Cloning into 'bar'...
> > >  done.
> > >
> > >When I use the same command on my Cygwin 64 installation, this used
> > >to work, but does not work any more.  I can fetch and otherwise use
> > >Git in existing repos all right (have not noticed anything else
> > >amiss), but the clone command fails like this:
> > >
> > >----
> > >cd /cygdrive/c/base
> > >git clone foo bar
> > >Cloning into 'bar'...
> > >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
> > >error: chmod on /cygdrive/c/base/bar/.git/config.lock failed: Invalid argument
> > >fatal: 'origin' does not appear to be a git repository
> > >fatal: Could not read from remote repository.
> > >
> > >Please make sure you have the correct access rights
> > >and the repository exists.
> > >----
> > >
> > >Directory `bar` exists neither before nor after the attempted cloning.
> > >In the parent directory, manually creating a subdirectory works as
> > >expected:
> > >
> > >  /cygdrive/c/base> mkdir bar; ls -ld bar; rmdir bar
> > >  drwx------+ 1 username 123 0 Jan 27 13:13 bar
> > >
> > >The issue is not restricted to local cloning, the same messages are
> > >printed when I attempt to clone from a remote host (from which I
> > >can clone just fine from a Linux client).
> > >
> > >Searching the internet for "cygwin git error chmod on config.lock
> > >failed: Invalid argument" gave not useful results.
> > >
> > >I first noticed the issue after having upgraded to Cygwin 2.4.0-1.
> > >Juding from the directory creation times in `base`,
> > >it looks like the last successful clone happened on 2015-07-28.
> > >I do not know which version of Cygwin I used at that time,
> > >I update roughly once a month.
> > >
> > >Today, I upgraded to 2.4.1-1, the issue persists.
> > >
> > >I tried downgrading git from 2.7 to 2.6 via the installer.
> > >The issue persisted, so I rolled forward again, the issue persisted.
> > >
> > >How can I troubleshoot this further?
> > 
> > There might be a problem with the default ACL on the directory
> > /cygdrive/c/base.  What does 'getfacl /cygdrive/c/base' show?
> 
> Also, what does the native windows icacls command print for that
> directory?  The setup of the ACL may give us a hint why git apparently
> fails to create the bar subdir.
> 
> 
> Thanks,
> Corinna
> 
> -- 
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Maintainer                 cygwin AT cygwin DOT com
> Red Hat
>

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: git clone fails with: error: chmod on config.lock failed: Invalid argument
  2016-01-28  6:35     ` Christopher Cobb
@ 2016-01-28 14:31       ` Corinna Vinschen
  2016-01-28 15:52         ` chmod failed: Invalid argument [was: git clone fails with: error: chmod on config.lock failed: Invalid argument] Corinna Vinschen
  2016-01-28 16:06         ` git clone fails with: error: chmod on config.lock failed: Invalid argument Corinna Vinschen
  2016-01-28 14:33       ` git clone fails with: error: " Andrey Repin
  1 sibling, 2 replies; 19+ messages in thread
From: Corinna Vinschen @ 2016-01-28 14:31 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1642 bytes --]

Please don't top-post.  Thank you.

On Jan 28 01:27, Christopher Cobb wrote:
> > From: "Corinna Vinschen"
> > On Jan 27 08:30, Ken Brown wrote:
> > > On 1/27/2016 7:41 AM, Rainer Blome wrote:
> > > >Hi!
> > > >
> > > >When I use "git clone foo bar" on a Linux host, it works as expected.
> > > >
> > > >  git clone foo bar
> > > >  Cloning into 'bar'...
> > > >  done.
> > > >
> > > >When I use the same command on my Cygwin 64 installation, this used
> > > >to work, but does not work any more.  I can fetch and otherwise use
> > > >Git in existing repos all right (have not noticed anything else
> > > >amiss), but the clone command fails like this:
> > > >
> > > >----
> > > >cd /cygdrive/c/base
> > > >git clone foo bar
> > > >Cloning into 'bar'...
> > > >error: chmod on /cygdrive/c/base/bar/.git/config.lock failed: Invalid argument
> > > >[...]
> > > 
> > > There might be a problem with the default ACL on the directory
> > > /cygdrive/c/base.  What does 'getfacl /cygdrive/c/base' show?
> > 
> > Also, what does the native windows icacls command print for that
> > directory?  The setup of the ACL may give us a hint why git apparently
> > fails to create the bar subdir.
> > 
> Or maybe chmod is broken, like it is on my machine:
> 
> $ touch x
> $ chmod 777 x
> chmod: changing permissions of ‘x’: Invalid argument

Can you please send the icacls output of the current directory and
the icacls out for the file x?


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: git clone fails with: error: chmod on config.lock failed: Invalid argument
  2016-01-28  6:35     ` Christopher Cobb
  2016-01-28 14:31       ` Corinna Vinschen
@ 2016-01-28 14:33       ` Andrey Repin
  1 sibling, 0 replies; 19+ messages in thread
From: Andrey Repin @ 2016-01-28 14:33 UTC (permalink / raw)
  To: Christopher Cobb, cygwin

Greetings, Christopher Cobb!

> Or maybe chmod is broken, like it is on my machine:

> $ touch x
> $ chmod 777 x
> chmod: changing permissions of ‘x’: Invalid argument

Please provide details according to

> Problem reports:       http://cygwin.com/problems.html

And please refrain from top-posting.


-- 
With best regards,
Andrey Repin
Thursday, January 28, 2016 16:28:10

Sorry for my terrible english...

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: chmod failed: Invalid argument [was: git clone fails with: error: chmod on config.lock failed: Invalid argument]
  2016-01-28 14:31       ` Corinna Vinschen
@ 2016-01-28 15:52         ` Corinna Vinschen
  2016-01-28 16:06         ` git clone fails with: error: chmod on config.lock failed: Invalid argument Corinna Vinschen
  1 sibling, 0 replies; 19+ messages in thread
From: Corinna Vinschen @ 2016-01-28 15:52 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1933 bytes --]

Rainer, please make sure your mailer doesn't break threading.  I tweaked
the "In-Reply-To" now to return to the original thread on the mailing
list.  Thank you.

On Jan 28 14:44, Rainer Blome wrote:
> Christopher Cobb wrote on Thu, 28 Jan 2016 01:27:16 +0100:
> > Or maybe chmod is broken, like it is on my machine
> [...]
> $ 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/
> ----

> 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@xyz.org
> error: chmod on /cygdrive/c/base/bar/.git/config.lock failed: Invalid argument
> ----
> 

Can you please run the same again under strace, e.g.,

  $ strace -o git.trace git config user.email myusername@xyz.org

and send the git.trace file?

Also, please send the icacls output for the directory "bar" and the
directory ".git".

What's weird here is the EINVAL error.  I can't reproduce this on
my machine yet, but if I get more info I might be able to do so.

> $ icacls .
> . myhostname\myusername:(F)
>   myhostname\None:(RX)
>   Everyone:(RX)
>   myhostname\myusername:(I)(OI)(CI)(F)

It's not a permission problem per se.  There's no "Permission denied"
message, just an "Invalid argument".  I just fail to see why this
happens...


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: git clone fails with: error: chmod on config.lock failed: Invalid argument
  2016-01-28 14:31       ` Corinna Vinschen
  2016-01-28 15:52         ` chmod failed: Invalid argument [was: git clone fails with: error: chmod on config.lock failed: Invalid argument] Corinna Vinschen
@ 2016-01-28 16:06         ` Corinna Vinschen
  2016-01-28 17:23           ` Aw: " Rainer Blome
  1 sibling, 1 reply; 19+ messages in thread
From: Corinna Vinschen @ 2016-01-28 16:06 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1915 bytes --]

On Jan 28 14:23, Corinna Vinschen wrote:
> Please don't top-post.  Thank you.
> 
> On Jan 28 01:27, Christopher Cobb wrote:
> > > From: "Corinna Vinschen"
> > > On Jan 27 08:30, Ken Brown wrote:
> > > > On 1/27/2016 7:41 AM, Rainer Blome wrote:
> > > > >Hi!
> > > > >
> > > > >When I use "git clone foo bar" on a Linux host, it works as expected.
> > > > >
> > > > >  git clone foo bar
> > > > >  Cloning into 'bar'...
> > > > >  done.
> > > > >
> > > > >When I use the same command on my Cygwin 64 installation, this used
> > > > >to work, but does not work any more.  I can fetch and otherwise use
> > > > >Git in existing repos all right (have not noticed anything else
> > > > >amiss), but the clone command fails like this:
> > > > >
> > > > >----
> > > > >cd /cygdrive/c/base
> > > > >git clone foo bar
> > > > >Cloning into 'bar'...
> > > > >error: chmod on /cygdrive/c/base/bar/.git/config.lock failed: Invalid argument
> > > > >[...]
> > > > 
> > > > There might be a problem with the default ACL on the directory
> > > > /cygdrive/c/base.  What does 'getfacl /cygdrive/c/base' show?
> > > 
> > > Also, what does the native windows icacls command print for that
> > > directory?  The setup of the ACL may give us a hint why git apparently
> > > fails to create the bar subdir.
> > > 
> > Or maybe chmod is broken, like it is on my machine:
> > 
> > $ touch x
> > $ chmod 777 x
> > chmod: changing permissions of ‘x’: Invalid argument
> 
> Can you please send the icacls output of the current directory and
> the icacls out for the file x?

Also, an strace of chmod, e.g.

  $ strace -o chmod.strace chmod 777 x

might be helpful.  Please send the file chmod.strace with your reply.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Aw: Re: git clone fails with: error: chmod on config.lock failed: Invalid argument
  2016-01-28 16:06         ` git clone fails with: error: chmod on config.lock failed: Invalid argument Corinna Vinschen
@ 2016-01-28 17:23           ` Rainer Blome
  2016-01-28 18:56             ` Corinna Vinschen
  0 siblings, 1 reply; 19+ messages in thread
From: Rainer Blome @ 2016-01-28 17:23 UTC (permalink / raw)
  To: cygwin

> Gesendet: Donnerstag, 28. Januar 2016 um 15:33 Uhr
> Von: "Corinna Vinschen" <corinna-cygwin@cygwin.com>
> Also, an strace of chmod, e.g.
> 
>   $ strace -o chmod.strace chmod 777 x
> 
> might be helpful.  Please send the file chmod.strace with your reply.

$ strace -o chmod.strace chmod 777 foo
Segmentation fault

$ ls -la
total 0
drwx------+ 1 username 213 0 Jan 28 17:09 .
drwx------+ 1 username 213 0 Jan 28 15:14 ..
-rwx------  1 username 213 0 Jan 28 17:09 chmod.strace
-rwx------  1 username 213 0 Jan 28 15:14 foo

Ragards, Rainer

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Re: git clone fails with: error: chmod on config.lock failed: Invalid argument
  2016-01-28 17:23           ` Aw: " Rainer Blome
@ 2016-01-28 18:56             ` Corinna Vinschen
  2016-04-19  7:22               ` git clone fails with error " Tomas Jura
  0 siblings, 1 reply; 19+ messages in thread
From: Corinna Vinschen @ 2016-01-28 18:56 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 610 bytes --]

On Jan 28 17:11, Rainer Blome wrote:
> > Gesendet: Donnerstag, 28. Januar 2016 um 15:33 Uhr
> > Von: "Corinna Vinschen" <corinna-cygwin@cygwin.com>
> > Also, an strace of chmod, e.g.
> > 
> >   $ strace -o chmod.strace chmod 777 x
> > 
> > might be helpful.  Please send the file chmod.strace with your reply.
> 
> $ strace -o chmod.strace chmod 777 foo
> Segmentation fault

Drat.  See my other mail.  I wish I could reproduce this.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* git clone fails with error chmod on config.lock failed: Invalid argument
  2016-01-28 18:56             ` Corinna Vinschen
@ 2016-04-19  7:22               ` Tomas Jura
  2016-04-19  7:57                 ` Tomas Jura
  2016-04-19  8:11                 ` Corinna Vinschen
  0 siblings, 2 replies; 19+ messages in thread
From: Tomas Jura @ 2016-04-19  7:22 UTC (permalink / raw)
  To: corinna-cygwin; +Cc: cygwin

[-- Attachment #1: Type: text/plain, Size: 319 bytes --]

Hi

I got error  chmod on config.lock failed: Invalid argument and I was 
able to catch the strace. It is attached.

I had a suspicion to locales, but with the <code>LC_ALL=C chmod 777 
x</code< fails too.

Use CC: to my email address for any questions or requests for testing. 
I'm not in the mailing list.

Tomas





[-- Attachment #2: chmod.strace.gz --]
[-- Type: application/gzip, Size: 12558 bytes --]

[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* git clone fails with error chmod on config.lock failed: Invalid argument
  2016-04-19  7:22               ` git clone fails with error " Tomas Jura
@ 2016-04-19  7:57                 ` Tomas Jura
  2016-04-19  8:11                 ` Corinna Vinschen
  1 sibling, 0 replies; 19+ messages in thread
From: Tomas Jura @ 2016-04-19  7:57 UTC (permalink / raw)
  To: corinna-cygwin; +Cc: cygwin

[-- Attachment #1: Type: text/plain, Size: 319 bytes --]

Hi

I got error  chmod on config.lock failed: Invalid argument and I was 
able to catch the strace. It is attached.

I had a suspicion to locales, but with the <code>LC_ALL=C chmod 777 
x</code< fails too.

Use CC: to my email address for any questions or requests for testing. 
I'm not in the mailing list.

Tomas





[-- Attachment #2: chmod.strace.gz --]
[-- Type: application/gzip, Size: 12558 bytes --]

[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: git clone fails with error chmod on config.lock failed: Invalid argument
  2016-04-19  7:22               ` git clone fails with error " Tomas Jura
  2016-04-19  7:57                 ` Tomas Jura
@ 2016-04-19  8:11                 ` Corinna Vinschen
  2016-04-19 13:30                   ` Tomas Jura
  1 sibling, 1 reply; 19+ messages in thread
From: Corinna Vinschen @ 2016-04-19  8:11 UTC (permalink / raw)
  To: cygwin; +Cc: Tomas Jura

[-- Attachment #1: Type: text/plain, Size: 864 bytes --]

On Apr 19 09:22, Tomas Jura wrote:
> Hi
> 
> I got error  chmod on config.lock failed: Invalid argument and I was able to
> catch the strace. It is attached.

What I see from the strace, chmod fails to request group information:

299755  597014 [main] chmod 5840 internal_getlogin: group not found in group DB

So it looks like either your /etc/passwd or your /etc/group file is
broken.   The new account handling is a bit more sensitive to broken
passwd and group files.  For more information on the changes in account
handling see https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping

For a start, just move both files out of the way, stop your Cygwin
processes and try again.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: git clone fails with error chmod on config.lock failed: Invalid argument
  2016-04-19  8:11                 ` Corinna Vinschen
@ 2016-04-19 13:30                   ` Tomas Jura
  2016-04-19 14:04                     ` Corinna Vinschen
  0 siblings, 1 reply; 19+ messages in thread
From: Tomas Jura @ 2016-04-19 13:30 UTC (permalink / raw)
  To: cygwin

Hi

My passwd and groups files got automatically renamed. I can't identify 
the exact date. Last update of cygwin I did yesterday, but the rename 
could happen a long time ago.

 >pwd
/etc
 > ls  passwd* groups*
passwd.backup groups.backup

 > groups
groups: cannot find name for group ID 10749228312
10749228312 ZTB+Group(513) Administrators Users ..... ZTB+Group(1298252)...

ZTB is my AD domain. Seems that any of the groups that I have assigned 
on the domain level was not resolved.

In the old groups.backup there is a record:
None:S-1-5-21-4091695911-3229423371-1046061999-513:513:

BTW: My machine is Windows Server 2008, yesterday I also run the Windows 
update procedure before I notified the chmod error.
A months ago, I had to migrate to the new AD account. The cygwin was 
installed using my old account, which is deleted now. Is it possible 
that the query to AD runs under my old account?

Tomas

On 04/19/2016 10:11 AM, Corinna Vinschen wrote:
> On Apr 19 09:22, Tomas Jura wrote:
>> Hi
>>
>> I got error  chmod on config.lock failed: Invalid argument and I was able to
>> catch the strace. It is attached.
> What I see from the strace, chmod fails to request group information:
>
> 299755  597014 [main] chmod 5840 internal_getlogin: group not found in group DB
>
> So it looks like either your /etc/passwd or your /etc/group file is
> broken.   The new account handling is a bit more sensitive to broken
> passwd and group files.  For more information on the changes in account
> handling see https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping
>
> For a start, just move both files out of the way, stop your Cygwin
> processes and try again.
>
>
> Corinna
>


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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: git clone fails with error chmod on config.lock failed: Invalid argument
  2016-04-19 13:30                   ` Tomas Jura
@ 2016-04-19 14:04                     ` Corinna Vinschen
  2016-04-20 14:06                       ` Tomas Jura
  0 siblings, 1 reply; 19+ messages in thread
From: Corinna Vinschen @ 2016-04-19 14:04 UTC (permalink / raw)
  To: cygwin; +Cc: Tomas Jura

[-- Attachment #1: Type: text/plain, Size: 1751 bytes --]

On Apr 19 13:20, Tomas Jura wrote:
> Hi
> 
> My passwd and groups files got automatically renamed. I can't identify the
> exact date. Last update of cygwin I did yesterday, but the rename could
> happen a long time ago.
> 
> >pwd
> /etc
> > ls  passwd* groups*
> passwd.backup groups.backup
> 
> > groups
> groups: cannot find name for group ID 10749228312
> 10749228312 ZTB+Group(513) Administrators Users ..... ZTB+Group(1298252)...
> 
> ZTB is my AD domain. Seems that any of the groups that I have assigned on
> the domain level was not resolved.

Yeah.  Group 513 on the AD level is the group "Domain Users" which should
always exist.  It looks like all LookupAccountSid requests to your primary
machine domain fail for some reason.

> In the old groups.backup there is a record:
> None:S-1-5-21-4091695911-3229423371-1046061999-513:513:

This is group 513 of the local SAM.  This is not related.

> BTW: My machine is Windows Server 2008, yesterday I also run the Windows
> update procedure before I notified the chmod error.
> A months ago, I had to migrate to the new AD account. The cygwin was
> installed using my old account, which is deleted now. Is it possible that
> the query to AD runs under my old account?

That's a good question.  The problem is that I can't see *why* the
requests fail.  This bugs me since failing LookupAccountSid calls should
result in a debug message when running strace.

Do you have changed your /etc/nsswitch.conf file by any chance?

Would you mind to create strace output of the command `id'?


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: git clone fails with error chmod on config.lock failed: Invalid argument
  2016-04-19 14:04                     ` Corinna Vinschen
@ 2016-04-20 14:06                       ` Tomas Jura
  2016-04-20 14:29                         ` Corinna Vinschen
  0 siblings, 1 reply; 19+ messages in thread
From: Tomas Jura @ 2016-04-20 14:06 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 772 bytes --]

On 04/19/2016 03:39 PM, Corinna Vinschen wrote:
>> BTW: My machine is Windows Server 2008, yesterday I also run the Windows
>> update procedure before I notified the chmod error.
>> A months ago, I had to migrate to the new AD account. The cygwin was
>> installed using my old account, which is deleted now. Is it possible that
>> the query to AD runs under my old account?
> That's a good question.  The problem is that I can't see *why* the
> requests fail.  This bugs me since failing LookupAccountSid calls should
> result in a debug message when running strace.
>
> Do you have changed your /etc/nsswitch.conf file by any chance?
No I did not. All lines are commented out there.

>
> Would you mind to create strace output of the command `id'?
See attachment


Tomas

[-- Attachment #2: id.strace.gz --]
[-- Type: application/gzip, Size: 12513 bytes --]

[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: git clone fails with error chmod on config.lock failed: Invalid argument
  2016-04-20 14:06                       ` Tomas Jura
@ 2016-04-20 14:29                         ` Corinna Vinschen
  2016-04-21  7:29                           ` Tomas Jura
  0 siblings, 1 reply; 19+ messages in thread
From: Corinna Vinschen @ 2016-04-20 14:29 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1862 bytes --]

On Apr 20 15:05, Tomas Jura wrote:
> On 04/19/2016 03:39 PM, Corinna Vinschen wrote:
> >>BTW: My machine is Windows Server 2008, yesterday I also run the Windows
> >>update procedure before I notified the chmod error.
> >>A months ago, I had to migrate to the new AD account. The cygwin was
> >>installed using my old account, which is deleted now. Is it possible that
> >>the query to AD runs under my old account?
> >That's a good question.  The problem is that I can't see *why* the
> >requests fail.  This bugs me since failing LookupAccountSid calls should
> >result in a debug message when running strace.
> >
> >Do you have changed your /etc/nsswitch.conf file by any chance?
> No I did not. All lines are commented out there.
> 
> >
> >Would you mind to create strace output of the command `id'?
> See attachment

Thanks.  It's not helpful, unfortunately.  The only hint that something
is going wrong is the same message as with chmod:

  internal_getlogin: group not found in group DB

There's no other strace message even remotely related to account mapping.
I don't grok that.  There should really be some error message :(

Btw., what's the output of `id'?

I'm wondering... is it possible that LDAP access to your DCs is
restricted?  

Also, can you change /etc/nsswitch.conf like this:

  db_enum: cache local primary

(see https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch-enum)

exit and restart your shell and call `getent group'?  What does it
print?  Are the AD accounts enumerated and what info is printed for
them?  Examples are sufficent, I don't need your entire AD DB :)

Also, what does `getent passwd $USER' print?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: git clone fails with error chmod on config.lock failed: Invalid argument
  2016-04-20 14:29                         ` Corinna Vinschen
@ 2016-04-21  7:29                           ` Tomas Jura
  2016-04-21  7:49                             ` Corinna Vinschen
  0 siblings, 1 reply; 19+ messages in thread
From: Tomas Jura @ 2016-04-21  7:29 UTC (permalink / raw)
  To: cygwin

On 04/20/2016 04:25 PM, Corinna Vinschen wrote:
> On Apr 20 15:05, Tomas Jura wrote:
>> On 04/19/2016 03:39 PM, Corinna Vinschen wrote:
>>>> BTW: My machine is Windows Server 2008, yesterday I also run the Windows
>>>> update procedure before I notified the chmod error.
>>>> A months ago, I had to migrate to the new AD account. The cygwin was
>>>> installed using my old account, which is deleted now. Is it possible that
>>>> the query to AD runs under my old account?
>>> That's a good question.  The problem is that I can't see *why* the
>>> requests fail.  This bugs me since failing LookupAccountSid calls should
>>> result in a debug message when running strace.
>>>
>>> Do you have changed your /etc/nsswitch.conf file by any chance?
>> No I did not. All lines are commented out there.
>>
>>> Would you mind to create strace output of the command `id'?
>> See attachment
> Thanks.  It's not helpful, unfortunately.  The only hint that something
> is going wrong is the same message as with chmod:
>
>    internal_getlogin: group not found in group DB
>
> There's no other strace message even remotely related to account mapping.
> I don't grok that.  There should really be some error message :(
>
> Btw., what's the output of `id'?
>
> I'm wondering... is it possible that LDAP access to your DCs is
> restricted?
>
> Also, can you change /etc/nsswitch.conf like this:
>
>    db_enum: cache local primary
>
> (seehttps://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch-enum)
>
> exit and restart your shell and call `getent group'?  What does it
> print?  Are the AD accounts enumerated and what info is printed for
> them?  Examples are sufficent, I don't need your entire AD DB :)
>
> Also, what does `getent passwd $USER' print?
>
>
> Corinna
>
Hi

Trying to modify the /etc/nsswitch.conf , I found that I can't write it 
! The file is writable only by the user which created it and which not 
exists any more (see above my story). I changed owner and access rights 
for /etc/nsswitch.conf and whole /var directory tree (also /var/cache).  
And it's started working!

Then I removed the modifications of the /etc/nsswitch.conf (all lines 
commented)  and it works too. It seems that the problem is related to 
file access rights to /var.

Tomas


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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: git clone fails with error chmod on config.lock failed: Invalid argument
  2016-04-21  7:29                           ` Tomas Jura
@ 2016-04-21  7:49                             ` Corinna Vinschen
  0 siblings, 0 replies; 19+ messages in thread
From: Corinna Vinschen @ 2016-04-21  7:49 UTC (permalink / raw)
  To: cygwin; +Cc: Tomas Jura

[-- Attachment #1: Type: text/plain, Size: 2703 bytes --]

On Apr 21 09:15, Tomas Jura wrote:
> On 04/20/2016 04:25 PM, Corinna Vinschen wrote:
> >On Apr 20 15:05, Tomas Jura wrote:
> >>On 04/19/2016 03:39 PM, Corinna Vinschen wrote:
> >>>>BTW: My machine is Windows Server 2008, yesterday I also run the Windows
> >>>>update procedure before I notified the chmod error.
> >>>>A months ago, I had to migrate to the new AD account. The cygwin was
> >>>>installed using my old account, which is deleted now. Is it possible that
> >>>>the query to AD runs under my old account?
> >>>That's a good question.  The problem is that I can't see *why* the
> >>>requests fail.  This bugs me since failing LookupAccountSid calls should
> >>>result in a debug message when running strace.
> >>>
> >>>Do you have changed your /etc/nsswitch.conf file by any chance?
> >>No I did not. All lines are commented out there.
> >>
> >>>Would you mind to create strace output of the command `id'?
> >>See attachment
> >Thanks.  It's not helpful, unfortunately.  The only hint that something
> >is going wrong is the same message as with chmod:
> >
> >   internal_getlogin: group not found in group DB
> >
> >There's no other strace message even remotely related to account mapping.
> >I don't grok that.  There should really be some error message :(
> >
> >Btw., what's the output of `id'?
> >
> >I'm wondering... is it possible that LDAP access to your DCs is
> >restricted?
> >
> >Also, can you change /etc/nsswitch.conf like this:
> >
> >   db_enum: cache local primary
> >
> >(seehttps://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch-enum)
> >
> >exit and restart your shell and call `getent group'?  What does it
> >print?  Are the AD accounts enumerated and what info is printed for
> >them?  Examples are sufficent, I don't need your entire AD DB :)
> >
> >Also, what does `getent passwd $USER' print?
> >
> >
> >Corinna
> >
> Hi
> 
> Trying to modify the /etc/nsswitch.conf , I found that I can't write it !
> The file is writable only by the user which created it and which not exists
> any more (see above my story). I changed owner and access rights for
> /etc/nsswitch.conf and whole /var directory tree (also /var/cache).  And
> it's started working!
> 
> Then I removed the modifications of the /etc/nsswitch.conf (all lines
> commented)  and it works too. It seems that the problem is related to file
> access rights to /var.

Weird.  Cygwin doesn't use /var by itself.  Only applications do.
But, anyway, I'm glad you could fix it.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-04-21  7:46 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-27 16:34 git clone fails with: error: chmod on config.lock failed: Invalid argument Rainer Blome
2016-01-27 18:33 ` Ken Brown
2016-01-27 18:39   ` Corinna Vinschen
2016-01-28  6:35     ` Christopher Cobb
2016-01-28 14:31       ` Corinna Vinschen
2016-01-28 15:52         ` chmod failed: Invalid argument [was: git clone fails with: error: chmod on config.lock failed: Invalid argument] Corinna Vinschen
2016-01-28 16:06         ` git clone fails with: error: chmod on config.lock failed: Invalid argument Corinna Vinschen
2016-01-28 17:23           ` Aw: " Rainer Blome
2016-01-28 18:56             ` Corinna Vinschen
2016-04-19  7:22               ` git clone fails with error " Tomas Jura
2016-04-19  7:57                 ` Tomas Jura
2016-04-19  8:11                 ` Corinna Vinschen
2016-04-19 13:30                   ` Tomas Jura
2016-04-19 14:04                     ` Corinna Vinschen
2016-04-20 14:06                       ` Tomas Jura
2016-04-20 14:29                         ` Corinna Vinschen
2016-04-21  7:29                           ` Tomas Jura
2016-04-21  7:49                             ` Corinna Vinschen
2016-01-28 14:33       ` git clone fails with: error: " Andrey Repin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).