[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:09:34 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
On 11/21/2013 08:53 AM, Eric Blake wrote:
> If you provide a colon, you MUST also provide a group spec. Per 'chown
> --help', the syntax is:
> chown [OPTION]... [OWNER][:[GROUP]] FILE...
Hmm, on re-reading this, I think we have two bugs in our help syntax.
The major bug is that we document [GROUP] as optional, but in reality it
is mandatory if ':' is present. So we definitely need to change
'[:[GROUP]]' to '[:GROUP]'.
The minor group stems from a GNU extension. POSIX requires that the
OWNER portion is mandatory:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/chown.html
But as a GNU extension, we allow it to be empty to allow for:
> chown :1001 /tmp/bla # change group only
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]?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature