public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: chmod failed: Invalid argument
Date: Mon, 08 Feb 2016 14:29:00 -0000	[thread overview]
Message-ID: <20160208142930.GF12975@calimero.vinschen.de> (raw)
In-Reply-To: <56AE6D83.9070201@gmx.de>

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

On Jan 31 21:24, Rainer Blome wrote:
> On 28.01.2016 21:40, Corinna Vinschen wrote:
> >>> On a hunch, do you have old /etc/passwd and /etc/group files by
> >>> any chance?  Does moving them out of /etc (don't delete them for
> >>> now!), exiting from Cygwin and starting a new shell somehow fix
> >>> things for you? How do the files look like?
> >> 
> >> Define "old"! ;-) Yes, I do. There is no `/etc/group`, but 
> >> `/etc/passwd` defines the group ID of my user as 213 (the real ID
> >> is a bit different, to be honest, but I do not think that 
> >> matters.)
> 
> The real group ID is 513, by the way. On a Cygwin 2.3.1 on a different
> machine, `/etc/passwd` also has 513 in the group column of all users.
> Yet, when I ask for `id`, I get something like this (translated):
> 
>  uid=197609(username) gid=197121(None) \
>   Groups=197121(None),545(Users),...

These values make sense.

> > Ouch, that may be the reason.  I have to check that but your passwd
> > and group files are
> > 
> > 1) Not required anymore, see 
> > https://cygwin.com/cygwin-ug-net/ntsec.htm, and
> 
> Well, I do not use Active Directory, and I try to maintain a stable
> home directory across new machines, drives or Windows reinstalls,
> so I specify this directory in `/etc/passwd`. Since it is small,
> I see no harm in using this method.
> 
> On my Cygwin 2.4.1, to get things to run the way I want them, I
> renamed `/etc/passwd.renamed` back to `/etc/passwd`, and replaced
> the old group id by the ID of group "None", 197121.
> In a new terminal, things now run as expected, SSH finds its .ssh
> directory and `chmod` etc. work the way that they should.
> 
> > 2) *iff* they are there, there's good reason to have them in a good
> > working shape.
> 
> No doubt. So what kind of maintenance do these files need?
> Should I have known that they do?

They should match.  For instance, one problem is if your passwd entry
contains a gid not available in either the Windows user DB or /etc/group.

> > Thanks for *your* help.  I expect there are still a few problems in
> > that code since not even a multi-month testphase finds all problems.
> 
> I am curious what change triggered the issue, can you point me to a
> commit or change-log entry?

Not a single one.  It's probably related to the new ACL handling but
knowing it more specificially requires debugging.


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

  reply	other threads:[~2016-02-08 14:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-28 15:43 Rainer Blome
2016-01-28 16:11 ` Corinna Vinschen
2016-01-28 17:23   ` Aw: " Rainer Blome
2016-01-28 18:43     ` Corinna Vinschen
2016-01-28 20:18       ` Rainer Blome
2016-01-28 21:47         ` Corinna Vinschen
2016-01-31 22:45           ` Rainer Blome
2016-02-08 14:29             ` Corinna Vinschen [this message]
2016-02-10 10:59               ` Rainer Blome
2016-02-10 11:37                 ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160208142930.GF12975@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).