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: Eric Blake
Subject: bug#15945: chown: Does now allow setting user and users login group with numerical user ID
Date: Thu, 21 Nov 2013 09:32:25 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

tag 15945 - notabug
reopen 15945
thanks

On 11/21/2013 09:24 AM, Tormen wrote:

>>> Leading to:
>>>     chown: invalid spec: `1001:'
>> Drop the trailing colon.
> But I want the same effect than
>     chown me: /tmp/bla

Ooh, you're right.  We DO document that:

OWNER':'GROUP
     If the OWNER is followed by a colon and a GROUP (a group name or
     numeric group ID), with no spaces between them, the group ownership
     of the files is changed as well (to GROUP).

OWNER':'
     If a colon but no group name follows OWNER, that user is made the
     owner of the files and the group of the files is changed to OWNER's
     login group.

so it looks like we have a bug that if OWNER is numeric, we aren't
looking up OWNER's login group.

Which means my earlier comments aren't quite correct - the existing use
of [:[GROUP]] in usage text is correct.  But I _still_ think we need to
split into two lines to make it obvious that the argument itself is
mandatory, as in:

Usage: chown [OPTION]... OWNER[:[GROUP]] FILE...
  or:  chown [OPTION]... :[GROUP] FILE...

or even rewrite it along the lines of the info page:

Usage: chown [OPTION]... NEWSPEC FILE...

and document that NEWSPEC is [OWNER][:[GROUP]]

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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