GNU bug report logs -
#15945
chown: accept "[NUMERIC-ID]:" syntax
Previous Next
Full log
Message #27 received at 15945 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, attachment)]
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.