GNU bug report logs -
#15945
chown: accept "[NUMERIC-ID]:" syntax
Previous Next
Full log
Message #61 received at 15945 <at> debbugs.gnu.org (full text, mbox):
On 21/11/13 18:47, Eric Blake wrote:
> On 11/21/2013 10:45 AM, Andreas Schwab wrote:
>> Eric Blake <eblake <at> redhat.com> 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
This bug report was last modified 6 years and 155 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.