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 08:53:47 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

tag 15945 notabug
thanks

On 11/21/2013 04:50 AM, Tormen wrote:

> 
> I think I just found a bug in chown... \o/ ;)
> 
> I tried:
>       chown 1001: /tmp/bla
> 
> Leading to:
>       chown: invalid spec: `1001:'

Drop the trailing colon.

> ... it should be a bug except if there is a technical detail I am
> missing here.

If you provide a colon, you MUST also provide a group spec.  Per 'chown
--help', the syntax is:
 chown [OPTION]...  [OWNER][:[GROUP]] FILE...
so these are valid:
 chown 1001 /tmp/bla        # change owner only
 chown :1001 /tmp/bla       # change group only
 chown 1001:1001 /tmp/bla   # change both
but this is invalid:
 chown 1001: /tmp/bla       # '' is not a valid 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]