bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15945: chown: Does now allow setting user and users login group with


From: Tormen
Subject: bug#15945: chown: Does now allow setting user and users login group with numerical user ID
Date: Thu, 21 Nov 2013 19:07:59 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10

On 21/11/13 18:47, Eric Blake wrote:
> On 11/21/2013 10:45 AM, Andreas Schwab wrote:
>> Eric Blake <address@hidden> writes:
>>
>>> so it looks like we have a bug that if OWNER is numeric, we aren't
>>> looking up OWNER's login group.
>> There may not be a unique uid to user name mapping.
Interesting. But I guess the ID (for owner and group) is what is stored
in the filesystem
(as you can rename users and the ID stays the same on the file).
In which case there is no tranlsation (ID -> name) necessary when
calling chown with an uid.
The "ls" then does the lookup to translate the ID in a name then.
And so the ls could run into the mapping problem...  or chown if called
with a username.

Or is it the other way round ?

> Right, but in that case, the error message should make sense.  Rather
> than being a blanket "invalid spec: `1001:'" it should say something
> like "unable to determine default group for user `1001'"
>
So in no case there should be a mapping problem when using numerical IDs
for users/groups.
Only when called with names.

In any case, in my case the mapping is unique:

grep 1001 /etc/passwd
me:x:1001:1001:This is Me,,,:/home/me:/bin/zsh

:)


Tormen






reply via email to

[Prev in Thread] Current Thread [Next in Thread]