GNU bug report logs - #15945
chown: accept "[NUMERIC-ID]:" syntax

Previous Next

Package: coreutils;

Reported by: Tormen <quickhelp <at> gmail.com>

Date: Thu, 21 Nov 2013 15:18:03 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Tormen <quickhelp <at> gmail.com>
To: Eric Blake <eblake <at> redhat.com>
Cc: 15945 <at> debbugs.gnu.org
Subject: bug#15945: chown: Does now allow setting user and users login group with numerical user ID
Date: Thu, 21 Nov 2013 17:36:14 +0100
On 21/11/13 17:09, Eric Blake wrote:
> But as written, the usage text implies that we can omit both OWNER and
> :GROUP and still have a valid call, as in:
>
> chown /tmp/bla
>
> which isn't quite true.  Alas, the only way I can see to rewrite the
> fact that SOME spec is necessary, while still highlighting the GNU
> extension of omitting OWNER, is to split the usage into two lines:
>
> Usage: chown [OPTION]... OWNER[:[GROUP]] FILE...
>   or:  chown [OPTION]... :GROUP FILE...
>
> Thoughts?  Should we reopen this bug to track the doc bug[s]?
>
> Alas, ...
Hehe.

I agree, two lines should be the only way to express that
there are 4 possibilities:
    chown OWNER
    chown OWNER:
    chown OWNER:GROUP
    chwon :GROUP

But shouldn't all 4 possibilities allow both OWNER and GROUP to be
specified either as NAME or as numerical ID ?

    chown OWNERNAME           == chown OWNERID    [*]
    chown OWNERNAME:          == chown OWNERID:   [**]
    chown OWNERNAME:GROUPNAME == chown OWNERID:GROUPID[*]
    chwon :GROUPNAME          ==chown :GROUPID [*]

[*] working as expected
[**] NOT working as expected (see my bug report) ... but why ?

Especially as:
    chown 1001:mine /tmp/bla
and
    chown me:1001 /tmp/bla
works fine!

(with mine == 1001)


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.