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: Erik Auerswald <auerswal <at> unix-ag.uni-kl.de>
To: 15945 <at> debbugs.gnu.org, eblake <at> redhat.com, quickhelp <at> gmail.com
Subject: bug#15945: chown: Does now allow setting user and users login group with numerical user ID
Date: Thu, 21 Nov 2013 17:10:54 +0100
Hi,

On Thu, Nov 21, 2013 at 08:53:47AM -0700, Eric Blake wrote:
> 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

Should this be changed to 'chown [OPTION]...  [OWNER][:GROUP] FILE...'
then?

Erik




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.