GNU bug report logs - #15945
chown: accept "[NUMERIC-ID]:" syntax

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Severity: wishlist; Reported by: Tormen <quickhelp@HIDDEN>; dated Thu, 21 Nov 2013 15:18:03 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.
Changed bug title to 'chown: accept "[NUMERIC-ID]:" syntax' from 'chown: Does now allow setting user and users login group with numerical user ID' Request was from Assaf Gordon <assafgordon@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Assaf Gordon <assafgordon@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 15945 <at> debbugs.gnu.org:


Received: (at 15945) by debbugs.gnu.org; 22 Nov 2013 00:06:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 19:06:18 2013
Received: from localhost ([127.0.0.1]:37578 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VjeGH-0006L8-Rg
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 19:06:18 -0500
Received: from mail-wg0-f49.google.com ([74.125.82.49]:55809)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <quickhelp@HIDDEN>) id 1VjeGE-0006Kt-AS
 for 15945 <at> debbugs.gnu.org; Thu, 21 Nov 2013 19:06:14 -0500
Received: by mail-wg0-f49.google.com with SMTP id x12so478129wgg.4
 for <15945 <at> debbugs.gnu.org>; Thu, 21 Nov 2013 16:06:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=message-id:date:from:user-agent:mime-version:to:cc:subject
 :references:in-reply-to:content-type:content-transfer-encoding;
 bh=1hMQ5hInGSuNowHq6YD1J25tkWNCBiZbUjwuoUEJmww=;
 b=CcfhbO2qcABCup9rhHy07GoOqqgBGfJOCArccEbUcUaMFhqb8FaCGE34WsI0pEkpGn
 XTM+43mJA+W+YaBxlwOopW0nc1I0Xgk1zFbmZ9/HD0RHqH3eI7wZHe4IOm4vtf7eSULq
 vpH6wDCOhamYVxc/pGagG+UCUKfbLJst7c9HLaLi5wDJIZuTPh9k2quRBY40ih8tUcF4
 fcQfe/2GZJn0Db1N/O+yI3SoroUpYwnTc9KiqweGzv3oz6Ra2RSB/CGeqqtR8ZvmvcKs
 BODjPr7/TvghNPU5mz8hZdypEGkj7rBTu+2Q6fReNruJsuG+SY4d11bm7fiEKdhxQOB6
 mydw==
X-Received: by 10.194.110.138 with SMTP id ia10mr7959654wjb.3.1385078768268;
 Thu, 21 Nov 2013 16:06:08 -0800 (PST)
Received: from [192.168.192.40] (74.235.31.109.rev.sfr.net. [109.31.235.74])
 by mx.google.com with ESMTPSA id ll10sm10159997wic.9.2013.11.21.16.06.07
 for <multiple recipients>
 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
 Thu, 21 Nov 2013 16:06:07 -0800 (PST)
Message-ID: <528E9FEE.3020105@HIDDEN>
Date: Fri, 22 Nov 2013 01:06:06 +0100
From: Tormen <quickhelp@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:17.0) Gecko/20131103 Icedove/17.0.10
MIME-Version: 1.0
To: Eric Blake <eblake@HIDDEN>
Subject: Re: bug#15945: chown: Does now allow setting user and users login
 group with numerical user ID
References: <528DF390.5010302@HIDDEN>
 <528E2C8B.4080708@HIDDEN>	<528E33B9.1010100@HIDDEN>
 <528E3599.2060203@HIDDEN> <87r4a9644d.fsf@HIDDEN>
 <528E4720.6020707@HIDDEN> <528E4BFF.5070001@HIDDEN>
 <528E72D1.4020805@HIDDEN>
In-Reply-To: <528E72D1.4020805@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 15945
Cc: Andreas Schwab <schwab@HIDDEN>, 15945 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Thanks a lot for explaining!!

On 21/11/13 21:53, Eric Blake wrote:
>>> Right, but in that case, the error message should make sense.  Rather
>>> than being a blanket "invalid spec: `1001:'" it should say something
>>> like "unable to determine default group for user `1001'"
>>>
>> So in no case there should be a mapping problem when using numerical IDs
>> for users/groups.
>> Only when called with names.
> Not true - we still have two potential lookup problems.  One is that
> that there may be NO name associated with ID (ls -l just falls back to
> listing id, but in the chmod case, we can't do a default login group
> lookup if we don't have a name).
Yes of course for the login group lookup needs the name! - Dough.
> Either way, my point remains - we should have a saner error message if
> we are unable to determine a default login group for a given user
> identification, rather than just declaring the entire '1001:' an invalid
> spec.
+1 for the nice error message :)





Information forwarded to bug-coreutils@HIDDEN:
bug#15945; Package coreutils. Full text available.

Message received at 15945 <at> debbugs.gnu.org:


Received: (at 15945) by debbugs.gnu.org; 21 Nov 2013 20:53:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 15:53:49 2013
Received: from localhost ([127.0.0.1]:37480 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VjbG0-0000LZ-Qm
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 15:53:49 -0500
Received: from mx1.redhat.com ([209.132.183.28]:60748)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eblake@HIDDEN>) id 1VjbFw-0000LJ-9M
 for 15945 <at> debbugs.gnu.org; Thu, 21 Nov 2013 15:53:46 -0500
Received: from int-mx11.intmail.prod.int.phx2.redhat.com
 (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])
 by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rALKrdCv009670
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Thu, 21 Nov 2013 15:53:39 -0500
Received: from [10.3.113.132] (ovpn-113-132.phx2.redhat.com [10.3.113.132])
 by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 rALKrbVt012351; Thu, 21 Nov 2013 15:53:37 -0500
Message-ID: <528E72D1.4020805@HIDDEN>
Date: Thu, 21 Nov 2013 13:53:37 -0700
From: Eric Blake <eblake@HIDDEN>
Organization: Red Hat, Inc.
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:24.0) Gecko/20100101 Thunderbird/24.1.0
MIME-Version: 1.0
To: Tormen <quickhelp@HIDDEN>
Subject: Re: bug#15945: chown: Does now allow setting user and users login
 group with numerical user ID
References: <528DF390.5010302@HIDDEN>
 <528E2C8B.4080708@HIDDEN>	<528E33B9.1010100@HIDDEN>
 <528E3599.2060203@HIDDEN> <87r4a9644d.fsf@HIDDEN>
 <528E4720.6020707@HIDDEN> <528E4BFF.5070001@HIDDEN>
In-Reply-To: <528E4BFF.5070001@HIDDEN>
X-Enigmail-Version: 1.6
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="E2jCeCB1lv3svGfkGs7P05erPOVVK3q7e"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
X-Spam-Score: -5.5 (-----)
X-Debbugs-Envelope-To: 15945
Cc: Andreas Schwab <schwab@HIDDEN>, 15945 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.5 (-----)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--E2jCeCB1lv3svGfkGs7P05erPOVVK3q7e
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 11/21/2013 11:07 AM, Tormen wrote:

>>> There may not be a unique uid to user name mapping.
> Interesting. But I guess the ID (for owner and group) is what is stored=

> in the filesystem
> (as you can rename users and the ID stays the same on the file).
> In which case there is no tranlsation (ID -> name) necessary when
> calling chown with an uid.
> The "ls" then does the lookup to translate the ID in a name then.
> And so the ls could run into the mapping problem...  or chown if called=

> with a username.
>=20
> Or is it the other way round ?

No, you have it right - stat() stores only uid, and ls(1) does a name
lookup for printing "the" (more precisely, "a") username associated with
that id.

>> Right, but in that case, the error message should make sense.  Rather
>> than being a blanket "invalid spec: `1001:'" it should say something
>> like "unable to determine default group for user `1001'"
>>
> So in no case there should be a mapping problem when using numerical ID=
s
> for users/groups.
> Only when called with names.

Not true - we still have two potential lookup problems.  One is that
that there may be NO name associated with ID (ls -l just falls back to
listing id, but in the chmod case, we can't do a default login group
lookup if we don't have a name).  Try as root:

# touch /tmp/f
# chown 12345 /tmp/f
# ls -l /tmp/f
-rw-r--r--. 1 12345 root 0 Nov 21 13:51 /tmp/f

The other is that even if a name is associated with an ID (whether the
only name, or whether the first name out of multiple that map to the
id), the default login group lookup for that name may fail (but that's
true even if we didn't first do a uid->name lookup).

Either way, my point remains - we should have a saner error message if
we are unable to determine a default login group for a given user
identification, rather than just declaring the entire '1001:' an invalid
spec.

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


--E2jCeCB1lv3svGfkGs7P05erPOVVK3q7e
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJSjnLRAAoJEKeha0olJ0NqcJcH/idOUJjxVYLgG0oCXm6IGCq2
UUY64CuRtg8PAn8YUb2WC3kMV9TMq6s64t96wZRId2YRA6pEcNMwIyxFE+cbgR+p
hLoVtCX4BbTMV68BwcgmEXw1sOGAUN7/B7tuyQvtp1Yqi8qw1kk7spyDblKmO/IF
eJfGC/CyNZ1zUT06h0eIFGMA8UctXx2yRwPbbbhmy03BTGxQxm3rbLe2B39u/qy6
L40iXfrz0HkZXN5Vg4spvYL4x3oFmGU2BN4vu9d9vy53d+/5vGhp3Drkh3RQEMqP
4WNXqGGsDy7OVjFh4seDY2SQEhMv/YKA9240Ok1XWHqJcXKoGtWKJEqXKXyOnZY=
=4aTj
-----END PGP SIGNATURE-----

--E2jCeCB1lv3svGfkGs7P05erPOVVK3q7e--




Information forwarded to bug-coreutils@HIDDEN:
bug#15945; Package coreutils. Full text available.

Message received at 15945 <at> debbugs.gnu.org:


Received: (at 15945) by debbugs.gnu.org; 21 Nov 2013 18:07:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 13:07:54 2013
Received: from localhost ([127.0.0.1]:37310 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VjYfS-0004Hk-ED
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 13:07:54 -0500
Received: from mail-wg0-f54.google.com ([74.125.82.54]:44967)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <quickhelp@HIDDEN>) id 1VjYfQ-0004HX-BP
 for 15945 <at> debbugs.gnu.org; Thu, 21 Nov 2013 13:07:52 -0500
Received: by mail-wg0-f54.google.com with SMTP id y10so108735wgg.9
 for <15945 <at> debbugs.gnu.org>; Thu, 21 Nov 2013 10:07:46 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=message-id:date:from:user-agent:mime-version:to:cc:subject
 :references:in-reply-to:content-type:content-transfer-encoding;
 bh=VD4tuo97JSVbpLwHouWQiUYq3JQITt49KwmS8pYC/Lo=;
 b=aORS+T1tLCOpR37exkY9PGtnV4jP+znYQdVO7UIkwBcnn8WCSAsTwEQLj0WNNHEZ6X
 N2p2xJq3T1lg1LD9yMC68oUyEegMHZXf4LQJ0tSaQmMVa+y/lXpzCH2Xq9oKfSFG0hAs
 6DReiPkD1kyAr6do+QmJdUDykmpPTWdvjHTlmrnpvu0XroOW9b/uB04SZaZjI+ueehIZ
 HjPcIX4h+Om+nv5I7SSWXEtGm2ORuWQuoSoqlh7BDlGOXra2YAd9bb/+6aQmADaOOZOO
 ApiEt/tLz+he035nI41ipdtkl19DnZvB5UdGy6xA+9EnzW0M0KoZj7Qzd9+9FNgCRX7+
 wUEQ==
X-Received: by 10.180.24.137 with SMTP id u9mr6985018wif.5.1385057266477;
 Thu, 21 Nov 2013 10:07:46 -0800 (PST)
Received: from [192.168.192.168] (74.235.31.109.rev.sfr.net. [109.31.235.74])
 by mx.google.com with ESMTPSA id
 w20sm7494930wia.5.2013.11.21.10.07.45 for <multiple recipients>
 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
 Thu, 21 Nov 2013 10:07:46 -0800 (PST)
Message-ID: <528E4BFF.5070001@HIDDEN>
Date: Thu, 21 Nov 2013 19:07:59 +0100
From: Tormen <quickhelp@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:17.0) Gecko/20131103 Icedove/17.0.10
MIME-Version: 1.0
To: Eric Blake <eblake@HIDDEN>
Subject: Re: bug#15945: chown: Does now allow setting user and users login
 group with numerical user ID
References: <528DF390.5010302@HIDDEN>
 <528E2C8B.4080708@HIDDEN>	<528E33B9.1010100@HIDDEN>
 <528E3599.2060203@HIDDEN> <87r4a9644d.fsf@HIDDEN>
 <528E4720.6020707@HIDDEN>
In-Reply-To: <528E4720.6020707@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 15945
Cc: Andreas Schwab <schwab@HIDDEN>, 15945 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On 21/11/13 18:47, Eric Blake wrote:
> On 11/21/2013 10:45 AM, Andreas Schwab wrote:
>> Eric Blake <eblake@HIDDEN> writes:
>>
>>> so it looks like we have a bug that if OWNER is numeric, we aren't
>>> looking up OWNER's login group.
>> There may not be a unique uid to user name mapping.
Interesting. But I guess the ID (for owner and group) is what is stored
in the filesystem
(as you can rename users and the ID stays the same on the file).
In which case there is no tranlsation (ID -> name) necessary when
calling chown with an uid.
The "ls" then does the lookup to translate the ID in a name then.
And so the ls could run into the mapping problem...  or chown if called
with a username.

Or is it the other way round ?

> Right, but in that case, the error message should make sense.  Rather
> than being a blanket "invalid spec: `1001:'" it should say something
> like "unable to determine default group for user `1001'"
>
So in no case there should be a mapping problem when using numerical IDs
for users/groups.
Only when called with names.

In any case, in my case the mapping is unique:

grep 1001 /etc/passwd
me:x:1001:1001:This is Me,,,:/home/me:/bin/zsh

:)


Tormen





Information forwarded to bug-coreutils@HIDDEN:
bug#15945; Package coreutils. Full text available.

Message received at 15945 <at> debbugs.gnu.org:


Received: (at 15945) by debbugs.gnu.org; 21 Nov 2013 18:01:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 13:01:48 2013
Received: from localhost ([127.0.0.1]:37275 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VjYZY-00046G-19
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 13:01:48 -0500
Received: from joseki.proulx.com ([216.17.153.58]:47951)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <bob@HIDDEN>) id 1VjYZV-000468-L3
 for 15945 <at> debbugs.gnu.org; Thu, 21 Nov 2013 13:01:46 -0500
Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119])
 by joseki.proulx.com (Postfix) with ESMTP id 9EB652122C
 for <15945 <at> debbugs.gnu.org>; Thu, 21 Nov 2013 11:01:44 -0700 (MST)
Received: by hysteria.proulx.com (Postfix, from userid 1000)
 id 8A9AF2DC77; Thu, 21 Nov 2013 11:01:44 -0700 (MST)
Date: Thu, 21 Nov 2013 11:01:44 -0700
From: Bob Proulx <bob@HIDDEN>
To: 15945 <at> debbugs.gnu.org
Subject: Re: bug#15945: chown: Does now allow setting user and users login
 group with numerical user ID
Message-ID: <20131121180144.GB27364@HIDDEN>
References: <528DF390.5010302@HIDDEN> <528E2C8B.4080708@HIDDEN>
 <528E33B9.1010100@HIDDEN> <528E3599.2060203@HIDDEN>
 <87r4a9644d.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <87r4a9644d.fsf@HIDDEN>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 15945
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Andreas Schwab wrote:
> Eric Blake writes:
> > so it looks like we have a bug that if OWNER is numeric, we aren't
> > looking up OWNER's login group.
> 
> There may not be a unique uid to user name mapping.

I think that anyone using this would expect it would take the first
one returned.  The same that happens right now in a "normal" system.
The same name that 'ls -l' would return.  We don't worry that 'ls -l'
might be mapping a name that might not be unique and shouldn't here
either.

I realize that 'nscd' breaks that long standing assumption that order
matters by returning one randomly.  I consider that a bug in nscd.

Bob




Information forwarded to bug-coreutils@HIDDEN:
bug#15945; Package coreutils. Full text available.

Message received at 15945 <at> debbugs.gnu.org:


Received: (at 15945) by debbugs.gnu.org; 21 Nov 2013 17:47:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 12:47:19 2013
Received: from localhost ([127.0.0.1]:37228 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VjYLX-0003gB-0f
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 12:47:19 -0500
Received: from mx1.redhat.com ([209.132.183.28]:22005)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eblake@HIDDEN>) id 1VjYLS-0003fx-HN
 for 15945 <at> debbugs.gnu.org; Thu, 21 Nov 2013 12:47:16 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
 (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
 by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rALHlDhg024023
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Thu, 21 Nov 2013 12:47:13 -0500
Received: from [10.3.113.132] (ovpn-113-132.phx2.redhat.com [10.3.113.132])
 by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 rALHlCcX022397; Thu, 21 Nov 2013 12:47:12 -0500
Message-ID: <528E4720.6020707@HIDDEN>
Date: Thu, 21 Nov 2013 10:47:12 -0700
From: Eric Blake <eblake@HIDDEN>
Organization: Red Hat, Inc.
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:24.0) Gecko/20100101 Thunderbird/24.1.0
MIME-Version: 1.0
To: Andreas Schwab <schwab@HIDDEN>
Subject: Re: bug#15945: chown: Does now allow setting user and users login
 group with numerical user ID
References: <528DF390.5010302@HIDDEN>
 <528E2C8B.4080708@HIDDEN>	<528E33B9.1010100@HIDDEN>
 <528E3599.2060203@HIDDEN> <87r4a9644d.fsf@HIDDEN>
In-Reply-To: <87r4a9644d.fsf@HIDDEN>
X-Enigmail-Version: 1.6
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="2cascSgCH6sxevIcWUABwT0lD6M3UDRtm"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-Spam-Score: -5.5 (-----)
X-Debbugs-Envelope-To: 15945
Cc: Tormen <quickhelp@HIDDEN>, 15945 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.5 (-----)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--2cascSgCH6sxevIcWUABwT0lD6M3UDRtm
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 11/21/2013 10:45 AM, Andreas Schwab wrote:
> Eric Blake <eblake@HIDDEN> writes:
>=20
>> so it looks like we have a bug that if OWNER is numeric, we aren't
>> looking up OWNER's login group.
>=20
> There may not be a unique uid to user name mapping.

Right, but in that case, the error message should make sense.  Rather
than being a blanket "invalid spec: `1001:'" it should say something
like "unable to determine default group for user `1001'"

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


--2cascSgCH6sxevIcWUABwT0lD6M3UDRtm
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJSjkcgAAoJEKeha0olJ0NqarUH/27tFmMWhV8MyFvsy2/+zozT
LeB7FEACAdJNsfNjYx0CzeVvfnLcsjd7NNjTnB+Aqma90LWjWAiqYX1Gi9bJbvco
bnAmklh29DiVv7t+4W/FtRVnnHnoAWKABUP16qupCpxeTHSNHYK68Sq632Pg3CHq
1aaANqiGnaVW4Ty+AYE3b+r9rHhdppM/xbSaUHl1ZDq9RJ7mYkMoPT+xfbkJZolj
0dxNynT1IsfYrPzHuM9BMuyo+f2geyanfc/Zqqpzkh1TBebGnWWZZSrEgcZ4J0qr
JwPjJuRVfNFFcgGyAfAJ4h/77npVskrawa+I2qKd1Nqmul2Wx2bTwR3CAlSsj2U=
=IvpA
-----END PGP SIGNATURE-----

--2cascSgCH6sxevIcWUABwT0lD6M3UDRtm--




Information forwarded to bug-coreutils@HIDDEN:
bug#15945; Package coreutils. Full text available.

Message received at 15945 <at> debbugs.gnu.org:


Received: (at 15945) by debbugs.gnu.org; 21 Nov 2013 17:45:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 12:45:12 2013
Received: from localhost ([127.0.0.1]:37209 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VjYJU-0003b9-4b
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 12:45:12 -0500
Received: from mail-out.m-online.net ([212.18.0.10]:54778)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <whitebox@HIDDEN>) id 1VjYJS-0003b1-1X
 for 15945 <at> debbugs.gnu.org; Thu, 21 Nov 2013 12:45:11 -0500
Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net
 [192.168.8.180])
 by mail-out.m-online.net (Postfix) with ESMTP id 3dQSpW5bFXz3hmd7;
 Thu, 21 Nov 2013 18:45:07 +0100 (CET)
Received: from localhost (dynscan1.mnet-online.de [192.168.6.68])
 by mail.m-online.net (Postfix) with ESMTP id 3dQSpW2rKXzbbhj;
 Thu, 21 Nov 2013 18:45:07 +0100 (CET)
X-Virus-Scanned: amavisd-new at mnet-online.de
Received: from mail.mnet-online.de ([192.168.8.180])
 by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new,
 port 10024)
 with ESMTP id q9_deDZi4qwx; Thu, 21 Nov 2013 18:45:06 +0100 (CET)
X-Auth-Info: vf46vsE8VFvA7zhdtYmV5epupkCvZgk/mkv0vt1rXaE=
Received: from igel.home (ppp-88-217-105-152.dynamic.mnet-online.de
 [88.217.105.152]) by mail.mnet-online.de (Postfix) with ESMTPA;
 Thu, 21 Nov 2013 18:45:06 +0100 (CET)
Received: by igel.home (Postfix, from userid 1000)
 id 0EACD2C1602; Thu, 21 Nov 2013 18:45:06 +0100 (CET)
From: Andreas Schwab <schwab@HIDDEN>
To: Eric Blake <eblake@HIDDEN>
Subject: Re: bug#15945: chown: Does now allow setting user and users login
 group with numerical user ID
References: <528DF390.5010302@HIDDEN> <528E2C8B.4080708@HIDDEN>
 <528E33B9.1010100@HIDDEN> <528E3599.2060203@HIDDEN>
X-Yow: Yow!  I threw up on my window!
Date: Thu, 21 Nov 2013 18:45:06 +0100
In-Reply-To: <528E3599.2060203@HIDDEN> (Eric Blake's message of "Thu, 21
 Nov 2013 09:32:25 -0700")
Message-ID: <87r4a9644d.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 15945
Cc: Tormen <quickhelp@HIDDEN>, 15945 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Eric Blake <eblake@HIDDEN> writes:

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

There may not be a unique uid to user name mapping.

Andreas.

-- 
Andreas Schwab, schwab@HIDDEN
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-coreutils@HIDDEN:
bug#15945; Package coreutils. Full text available.

Message received at 15945 <at> debbugs.gnu.org:


Received: (at 15945) by debbugs.gnu.org; 21 Nov 2013 16:49:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 11:49:58 2013
Received: from localhost ([127.0.0.1]:37067 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VjXS2-0000ta-DG
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:49:58 -0500
Received: from joseki.proulx.com ([216.17.153.58]:47670)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <bob@HIDDEN>) id 1VjXS0-0000tQ-IF
 for 15945 <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:49:56 -0500
Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119])
 by joseki.proulx.com (Postfix) with ESMTP id C0B6A21229;
 Thu, 21 Nov 2013 09:49:55 -0700 (MST)
Received: by hysteria.proulx.com (Postfix, from userid 1000)
 id B4AE32DC77; Thu, 21 Nov 2013 09:49:55 -0700 (MST)
Date: Thu, 21 Nov 2013 09:49:55 -0700
From: Bob Proulx <bob@HIDDEN>
To: 15945 <at> debbugs.gnu.org
Subject: Re: bug#15945: chown: Does now allow setting user and users login
 group with numerical user ID
Message-ID: <20131121164955.GB15837@HIDDEN>
References: <528DF390.5010302@HIDDEN> <528E2C8B.4080708@HIDDEN>
 <528E33B9.1010100@HIDDEN> <528E3599.2060203@HIDDEN>
 <20131121164723.GA15837@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20131121164723.GA15837@HIDDEN>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 15945
Cc: Tormen <quickhelp@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Bob Proulx wrote:
> Long ago this was an existing behavior of GNU rm and discussion on the

  s/rm/chown/

Argh!  The recent 'rm' discussion clouded my typing.  I meant 'chown' there.

Bob




Information forwarded to bug-coreutils@HIDDEN:
bug#15945; Package coreutils. Full text available.

Message received at 15945 <at> debbugs.gnu.org:


Received: (at 15945) by debbugs.gnu.org; 21 Nov 2013 16:47:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 11:47:27 2013
Received: from localhost ([127.0.0.1]:37057 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VjXPb-0000p0-9C
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:47:27 -0500
Received: from joseki.proulx.com ([216.17.153.58]:47659)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <bob@HIDDEN>) id 1VjXPZ-0000or-A7
 for 15945 <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:47:25 -0500
Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119])
 by joseki.proulx.com (Postfix) with ESMTP id EEEC021229;
 Thu, 21 Nov 2013 09:47:23 -0700 (MST)
Received: by hysteria.proulx.com (Postfix, from userid 1000)
 id E63162DC77; Thu, 21 Nov 2013 09:47:23 -0700 (MST)
Date: Thu, 21 Nov 2013 09:47:23 -0700
From: Bob Proulx <bob@HIDDEN>
To: 15945 <at> debbugs.gnu.org
Subject: Re: bug#15945: chown: Does now allow setting user and users login
 group with numerical user ID
Message-ID: <20131121164723.GA15837@HIDDEN>
References: <528DF390.5010302@HIDDEN> <528E2C8B.4080708@HIDDEN>
 <528E33B9.1010100@HIDDEN> <528E3599.2060203@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <528E3599.2060203@HIDDEN>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 15945
Cc: Tormen <quickhelp@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

Eric Blake wrote:
> 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.

Long ago this was an existing behavior of GNU rm and discussion on the
list talked of removing it.  I defended it because I often used this
on various systems to set the default group of a user.  Because some
systems are configured with user-private-groups where the user is in a
private group while on other systems the user is in a shared "users"
group.  Using 'chown foo: file' was a nice way to set the group to
foo's default group without needing to figure out what that group was
ahead of time.  I don't know when it was introduced into GNU chown but
at the least I had been using it extensively.

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

Seems that way.

Bob




Information forwarded to bug-coreutils@HIDDEN:
bug#15945; Package coreutils. Full text available.

Message received at 15945 <at> debbugs.gnu.org:


Received: (at 15945) by debbugs.gnu.org; 21 Nov 2013 16:46:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 11:46:42 2013
Received: from localhost ([127.0.0.1]:37050 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VjXOs-0000nL-7f
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:46:42 -0500
Received: from mail-wg0-f52.google.com ([74.125.82.52]:52456)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <quickhelp@HIDDEN>) id 1VjXOq-0000mx-5F
 for 15945 <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:46:40 -0500
Received: by mail-wg0-f52.google.com with SMTP id x13so486292wgg.19
 for <15945 <at> debbugs.gnu.org>; Thu, 21 Nov 2013 08:46:34 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=message-id:date:from:user-agent:mime-version:to:cc:subject
 :references:in-reply-to:content-type:content-transfer-encoding;
 bh=uOPkCPfaQkoEnixq5h/2oSu00p16J6NzzOn7Q3DdJAk=;
 b=eKjpGz4K45L7Hrlax7ys2PmMeT+LYJXeX6ubG7nTYmWCXLtKpa1DK9Isk9hRBG9wNB
 sPACbjPwGnobi+Gri7OmRLqUTvILQHgHfU3kpjV2iRucqGVe1JC3KpVdxVFk+fksNjgZ
 wsNPzfGSm7tGMXTeEcY/rGKlOUNOpdUzZgyRpTbRPKj/IWaPiVf8SROrAW92SJfk94e+
 EfeDuXoZ3hAM8lcVNLSK/Aq9JPMsLM1L99HB6Gs3drgptcTVgStndiQhzmcs71ruy3JN
 80RR7lGRnHAVUB7bafTLzRCePLsakipvWhaSB4Ej5bhqHACKFHVV/9jH08fbgBUGxcLv
 qlBA==
X-Received: by 10.194.120.100 with SMTP id lb4mr161489wjb.79.1385052394365;
 Thu, 21 Nov 2013 08:46:34 -0800 (PST)
Received: from [192.168.192.168] (74.235.31.109.rev.sfr.net. [109.31.235.74])
 by mx.google.com with ESMTPSA id
 bs15sm6808463wib.10.2013.11.21.08.46.33 for <multiple recipients>
 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
 Thu, 21 Nov 2013 08:46:33 -0800 (PST)
Message-ID: <528E38F6.8020500@HIDDEN>
Date: Thu, 21 Nov 2013 17:46:46 +0100
From: Tormen <quickhelp@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:17.0) Gecko/20131103 Icedove/17.0.10
MIME-Version: 1.0
To: Eric Blake <eblake@HIDDEN>
Subject: Re: bug#15945: chown: Does now allow setting user and users login
 group with numerical user ID
References: <528DF390.5010302@HIDDEN> <528E2C8B.4080708@HIDDEN>
 <528E33B9.1010100@HIDDEN> <528E3599.2060203@HIDDEN>
 <528E37AF.2010300@HIDDEN> <528E3852.60600@HIDDEN>
In-Reply-To: <528E3852.60600@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 15945
Cc: 15945 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

On 21/11/13 17:44, Eric Blake wrote:
> On 11/21/2013 09:41 AM, Tormen wrote:
>>>> But I want the same effect than
>>>>     chown me: /tmp/bla
>>> Ooh, you're right.  We DO document that:
>> I started wondering if I missed something extremely obvious here ;)
> No, rather _I_ missed that 'chown --help' is (intentionally) not as
> comprehensive as 'info coreutils chown' :)
>
I wonder how old the bug is (my "bug-hunters pride" talking)...





Information forwarded to bug-coreutils@HIDDEN:
bug#15945; Package coreutils. Full text available.

Message received at 15945 <at> debbugs.gnu.org:


Received: (at 15945) by debbugs.gnu.org; 21 Nov 2013 16:44:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 11:44:07 2013
Received: from localhost ([127.0.0.1]:37045 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VjXMM-00083z-OZ
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:44:06 -0500
Received: from mx1.redhat.com ([209.132.183.28]:8949)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eblake@HIDDEN>) id 1VjXMK-00083q-D2
 for 15945 <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:44:05 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
 (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
 by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rALGi24H026490
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Thu, 21 Nov 2013 11:44:03 -0500
Received: from [10.3.113.132] (ovpn-113-132.phx2.redhat.com [10.3.113.132])
 by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 rALGi2px002724; Thu, 21 Nov 2013 11:44:02 -0500
Message-ID: <528E3852.60600@HIDDEN>
Date: Thu, 21 Nov 2013 09:44:02 -0700
From: Eric Blake <eblake@HIDDEN>
Organization: Red Hat, Inc.
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:24.0) Gecko/20100101 Thunderbird/24.1.0
MIME-Version: 1.0
To: Tormen <quickhelp@HIDDEN>
Subject: Re: bug#15945: chown: Does now allow setting user and users login
 group with numerical user ID
References: <528DF390.5010302@HIDDEN> <528E2C8B.4080708@HIDDEN>
 <528E33B9.1010100@HIDDEN> <528E3599.2060203@HIDDEN>
 <528E37AF.2010300@HIDDEN>
In-Reply-To: <528E37AF.2010300@HIDDEN>
X-Enigmail-Version: 1.6
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="AH0cJFvk7WaaHAlH0uW8NtX4WJw3OEmWo"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-Spam-Score: -5.5 (-----)
X-Debbugs-Envelope-To: 15945
Cc: 15945 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.5 (-----)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--AH0cJFvk7WaaHAlH0uW8NtX4WJw3OEmWo
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 11/21/2013 09:41 AM, Tormen wrote:
>>> But I want the same effect than
>>>     chown me: /tmp/bla
>> Ooh, you're right.  We DO document that:
> I started wondering if I missed something extremely obvious here ;)

No, rather _I_ missed that 'chown --help' is (intentionally) not as
comprehensive as 'info coreutils chown' :)

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


--AH0cJFvk7WaaHAlH0uW8NtX4WJw3OEmWo
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJSjjhSAAoJEKeha0olJ0NqA+4H/jNF47VcWr0RfoBy2axnFrLK
/ql6Zgcy9L/jovmRigHcHlO0e7b5JeyPcCogT6fgBDIeVXkTWMjogEg7cH4Ahwvr
VTf0BukbxNi5gySwv492ZhNqgwNKlXCNS5PBaUHjOiX4N349UfwWGUlI02049zUS
xCBqUU7bfTPuMg2wBNjZnK2g9qsokC706AIyHdPcdXLQKRfVP+ti6EhZ2fj0lr5B
ku/kM/EbZUSf6AEuoAeDRF+sBaefkj/M+b5vr3MYfmI+wfKAVRMnLJWM8+6F70g/
/MG3XqVlg3Yi+X9JeNmeqr0GVOgnq3NZxvBmcXjBCboGTyO+6vWFqiwOW55lXNo=
=M1AV
-----END PGP SIGNATURE-----

--AH0cJFvk7WaaHAlH0uW8NtX4WJw3OEmWo--




Information forwarded to bug-coreutils@HIDDEN:
bug#15945; Package coreutils. Full text available.

Message received at 15945 <at> debbugs.gnu.org:


Received: (at 15945) by debbugs.gnu.org; 21 Nov 2013 16:41:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 11:41:19 2013
Received: from localhost ([127.0.0.1]:37033 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VjXJf-0007yu-4H
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:41:19 -0500
Received: from mail-wi0-f169.google.com ([209.85.212.169]:56943)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <quickhelp@HIDDEN>) id 1VjXJd-0007yf-3q
 for 15945 <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:41:17 -0500
Received: by mail-wi0-f169.google.com with SMTP id hm6so365210wib.2
 for <15945 <at> debbugs.gnu.org>; Thu, 21 Nov 2013 08:41:11 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=message-id:date:from:user-agent:mime-version:to:cc:subject
 :references:in-reply-to:content-type:content-transfer-encoding;
 bh=2ZpY9L6kFKTAmRR0h9I+FRJ+lQowI9Uy/pxXi9jeoHY=;
 b=Rx8bwHtOBhlf93yTkgh2Q/GG6E5scgGO5c2VoVToLbH672KYES6klgaW4FfH/ixSr0
 aPHeAOIEgr8Go4UXzhQC6vus25y9Yu9yldg+okZGzeDTGYwgp79rxdLgjO2f6zkrFu+S
 SzlQ3sO/lOJvy1x0ZIIH+MtU8p5U60TBtGwgBKGHoeFXzO5PZ6eJwD0Vm1EvBbsAH4u3
 frsoQU5jebbfB/ug9XlJkOj8GP4Q+ncaCjzh4o5GSxDVPrWktqpb3/ULdpfZGo3CZMn3
 v8f5M8CcAzFeYdPKQ91Vk2eFXdfIXXUz06UyDWg8y5JkwgGXz5Nd5MrzzOlspWh5Gv+c
 uykg==
X-Received: by 10.194.119.106 with SMTP id kt10mr1077571wjb.72.1385052071016; 
 Thu, 21 Nov 2013 08:41:11 -0800 (PST)
Received: from [192.168.192.168] (74.235.31.109.rev.sfr.net. [109.31.235.74])
 by mx.google.com with ESMTPSA id
 fu1sm6774190wib.8.2013.11.21.08.41.08 for <multiple recipients>
 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
 Thu, 21 Nov 2013 08:41:10 -0800 (PST)
Message-ID: <528E37AF.2010300@HIDDEN>
Date: Thu, 21 Nov 2013 17:41:19 +0100
From: Tormen <quickhelp@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:17.0) Gecko/20131103 Icedove/17.0.10
MIME-Version: 1.0
To: Eric Blake <eblake@HIDDEN>
Subject: Re: bug#15945: chown: Does now allow setting user and users login
 group with numerical user ID
References: <528DF390.5010302@HIDDEN> <528E2C8B.4080708@HIDDEN>
 <528E33B9.1010100@HIDDEN> <528E3599.2060203@HIDDEN>
In-Reply-To: <528E3599.2060203@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 15945
Cc: 15945 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On 21/11/13 17:32, Eric Blake wrote:
> tag 15945 - notabug
> reopen 15945
> thanks
No, thank you :)

> 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:
I started wondering if I missed something extremely obvious here ;)

> 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]]
... and mention that either OWNER or GROUP needs to be present ;)

But I prefer the 2 lines ... more concise and allows to quickly grasp
the meaning (IMHO).

Tormen





Information forwarded to bug-coreutils@HIDDEN:
bug#15945; Package coreutils. Full text available.

Message received at 15945 <at> debbugs.gnu.org:


Received: (at 15945) by debbugs.gnu.org; 21 Nov 2013 16:39:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 11:39:30 2013
Received: from localhost ([127.0.0.1]:37029 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VjXHs-0007vi-V3
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:39:29 -0500
Received: from mail-we0-f178.google.com ([74.125.82.178]:47723)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <quickhelp@HIDDEN>) id 1VjXEe-0007pU-Qm
 for 15945 <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:36:09 -0500
Received: by mail-we0-f178.google.com with SMTP id u56so3617920wes.37
 for <15945 <at> debbugs.gnu.org>; Thu, 21 Nov 2013 08:36:03 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=message-id:date:from:user-agent:mime-version:to:cc:subject
 :references:in-reply-to:content-type:content-transfer-encoding;
 bh=usb6OEp44Ioweyj2nkRhmK3eJMXxIhzOUaQJmDCKMGc=;
 b=jmTi+dIc26hvPG3GUkrvSHx3MP3W8sNTpHHwnq1bLdmWhcWt/3kTlclwPbsPl6aAEa
 hKY0g4cQvzZvbFws7tUNZhdUhvVsVF/TFg1ONM+NLr6FVIKdwALwUlyrwyb3Tf8EadOw
 8VZT64TonWDE5mJGx5PlgpOBLC+u49L2gDEFFF/LhT2GH2J8lt2P5Cz4tdqgZWzyfUaw
 T+qAyaEPQW+cyGrpHJNkQr/WwNRfot6T/B0ZhxMebAQrNEmF5iZOCayV9BK7Zj7a2pJd
 o+xkaBEB91zOMIEQXJyCHsWskfOZRW3zt6uiT2EhHFtZzOrKCI6rgaW71KCSllnsgBzh
 VGjg==
X-Received: by 10.180.108.42 with SMTP id hh10mr15270373wib.15.1385051762855; 
 Thu, 21 Nov 2013 08:36:02 -0800 (PST)
Received: from [192.168.192.168] (74.235.31.109.rev.sfr.net. [109.31.235.74])
 by mx.google.com with ESMTPSA id
 a19sm6790184wib.1.2013.11.21.08.36.02 for <multiple recipients>
 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
 Thu, 21 Nov 2013 08:36:02 -0800 (PST)
Message-ID: <528E367E.4020101@HIDDEN>
Date: Thu, 21 Nov 2013 17:36:14 +0100
From: Tormen <quickhelp@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:17.0) Gecko/20131103 Icedove/17.0.10
MIME-Version: 1.0
To: Eric Blake <eblake@HIDDEN>
Subject: Re: bug#15945: chown: Does now allow setting user and users login
 group with numerical user ID
References: <528DF390.5010302@HIDDEN> <528E2C8B.4080708@HIDDEN>
 <528E303E.3090308@HIDDEN>
In-Reply-To: <528E303E.3090308@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 15945
X-Mailman-Approved-At: Thu, 21 Nov 2013 11:39:27 -0500
Cc: 15945 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On 21/11/13 17:09, Eric Blake wrote:
> 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]?
>
> Alas, ...
Hehe.

I agree, two lines should be the only way to express that
there are 4 possibilities:
    chown OWNER
    chown OWNER:
    chown OWNER:GROUP
    chwon :GROUP

But shouldn't all 4 possibilities allow both OWNER and GROUP to be
specified either as NAME or as numerical ID ?

    chown OWNERNAME           == chown OWNERID    [*]
    chown OWNERNAME:          == chown OWNERID:   [**]
    chown OWNERNAME:GROUPNAME == chown OWNERID:GROUPID[*]
    chwon :GROUPNAME          ==chown :GROUPID [*]

[*] working as expected
[**] NOT working as expected (see my bug report) ... but why ?

Especially as:
    chown 1001:mine /tmp/bla
and
    chown me:1001 /tmp/bla
works fine!

(with mine == 1001)


Tormen





Information forwarded to bug-coreutils@HIDDEN:
bug#15945; Package coreutils. Full text available.
Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.
Removed tag(s) notabug. Request was from Eric Blake <eblake@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 15945 <at> debbugs.gnu.org:


Received: (at 15945) by debbugs.gnu.org; 21 Nov 2013 16:32:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 11:32:30 2013
Received: from localhost ([127.0.0.1]:37006 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VjXB7-0007ie-4t
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:32:29 -0500
Received: from mx1.redhat.com ([209.132.183.28]:13288)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eblake@HIDDEN>)
 id 1VjXB5-0007iT-2g; Thu, 21 Nov 2013 11:32:27 -0500
Received: from int-mx11.intmail.prod.int.phx2.redhat.com
 (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])
 by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rALGWQ6x009407
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Thu, 21 Nov 2013 11:32:26 -0500
Received: from [10.3.113.132] (ovpn-113-132.phx2.redhat.com [10.3.113.132])
 by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 rALGWPZl027583; Thu, 21 Nov 2013 11:32:25 -0500
Message-ID: <528E3599.2060203@HIDDEN>
Date: Thu, 21 Nov 2013 09:32:25 -0700
From: Eric Blake <eblake@HIDDEN>
Organization: Red Hat, Inc.
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:24.0) Gecko/20100101 Thunderbird/24.1.0
MIME-Version: 1.0
To: Tormen <quickhelp@HIDDEN>
Subject: Re: bug#15945: chown: Does now allow setting user and users login
 group with numerical user ID
References: <528DF390.5010302@HIDDEN> <528E2C8B.4080708@HIDDEN>
 <528E33B9.1010100@HIDDEN>
In-Reply-To: <528E33B9.1010100@HIDDEN>
X-Enigmail-Version: 1.6
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="OwUl2ecXfVO5UmdPPjUGLjMFkMuclmf5T"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
X-Spam-Score: -5.5 (-----)
X-Debbugs-Envelope-To: 15945
Cc: 15945 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.5 (-----)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--OwUl2ecXfVO5UmdPPjUGLjMFkMuclmf5T
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

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]]

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


--OwUl2ecXfVO5UmdPPjUGLjMFkMuclmf5T
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJSjjWZAAoJEKeha0olJ0NqBS8H/RPD54SYimAf/oI/YOYu4lpW
h7ZIoBfgy4HKY9Kq64DRMCea1KP1tgnBScaLiZSRdyFPRO//sqV3zCCN2eWxvg1J
FNlcwccvwnnQPU3su17ZUagdPmBanqBWnZ+JqtcNJjibZ6Ng+VRht1FvsWbDJhQ1
6N0+QY+oODW6dyVvwthasiHwKmOkjsMaXZLOS0Uk7n1n2hCHTs3+/Rr6HAIstStv
k5AsSJk1nI5UOM8q1o2xy+0qdkXp/YkkkKJb9Kzl/KIJCRYE4LNSkIkVL0GN3IVs
X7Ow70deQXC6Vb8zxZJda3TcicKjtipkUArkOkC7mL27OyWYG9aBZVObKjmQZG0=
=9klh
-----END PGP SIGNATURE-----

--OwUl2ecXfVO5UmdPPjUGLjMFkMuclmf5T--




Information forwarded to bug-coreutils@HIDDEN:
bug#15945; Package coreutils. Full text available.

Message received at 15945-done <at> debbugs.gnu.org:


Received: (at 15945-done) by debbugs.gnu.org; 21 Nov 2013 16:25:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 11:25:37 2013
Received: from localhost ([127.0.0.1]:36971 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VjX4R-0007U9-6w
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:25:36 -0500
Received: from mail-wi0-f179.google.com ([209.85.212.179]:58605)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <quickhelp@HIDDEN>) id 1VjX3D-0007RJ-Vl
 for 15945-done <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:24:20 -0500
Received: by mail-wi0-f179.google.com with SMTP id ez12so1321507wid.0
 for <15945-done <at> debbugs.gnu.org>; Thu, 21 Nov 2013 08:24:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=message-id:date:from:user-agent:mime-version:to:cc:subject
 :references:in-reply-to:content-type:content-transfer-encoding;
 bh=+I03B29HkIgBok7Ct7sj/6dzsRyZIdPhJHxnVBXXkBE=;
 b=pTqW401elr3QyyfWbO2UI6TWzwHy0yUFXh7WVDoNi+q9sLHcFhfVBLG63fCDDcgOb5
 kMOcNz03702877KQomlVqgjwgWjNYVy2A/4JGR4zuFbFX6S8g+36/OcCpwurHl7JH1kn
 VnfVuxrQUcRLgubnbDYLMWo4rLPTwRdx7mqUfOdd2B1jDw4tbNtRQAFASRfBaOG2iMg1
 v9dcLCk6jclF3g4MQLgQPk5Rqo0WWwH/4ceIF64cAEgi8sfcnHnhn+bGGrR9QuO/Eh9D
 IXDdsH9a0MbthUuodLxiDuvBFYleK8ToYYBPAAItJjS5BVqGAlTWv6bIVAWkVMyKemwU
 T1Dg==
X-Received: by 10.194.23.8 with SMTP id i8mr1080084wjf.68.1385051054080;
 Thu, 21 Nov 2013 08:24:14 -0800 (PST)
Received: from [192.168.192.168] (74.235.31.109.rev.sfr.net. [109.31.235.74])
 by mx.google.com with ESMTPSA id
 bs15sm6629623wib.10.2013.11.21.08.24.13 for <multiple recipients>
 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
 Thu, 21 Nov 2013 08:24:13 -0800 (PST)
Message-ID: <528E33B9.1010100@HIDDEN>
Date: Thu, 21 Nov 2013 17:24:25 +0100
From: Tormen <quickhelp@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:17.0) Gecko/20131103 Icedove/17.0.10
MIME-Version: 1.0
To: Eric Blake <eblake@HIDDEN>
Subject: Re: bug#15945: chown: Does now allow setting user and users login
 group with numerical user ID
References: <528DF390.5010302@HIDDEN> <528E2C8B.4080708@HIDDEN>
In-Reply-To: <528E2C8B.4080708@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 15945-done
X-Mailman-Approved-At: Thu, 21 Nov 2013 11:25:29 -0500
Cc: 15945-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Hi again,

Sorry, I don't know why, but I missed this part of your answer:

On 21/11/13 16:53, Eric Blake 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.
But I want the same effect than
    chown me: /tmp/bla
so changing:
    (1) the owner of /tmp/bla to user "me"
    (2) the group of /tmp/bla to the login-group of user "me"

    chown me /tmp/bla
should only do (1), no ?


> 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
Yes, but when you execute:
    chown me: /tmp/bla

as group is '' as well and it is not a problem.

I don't see any problem / ambiguity in allowing both:
    chown me: /tmp/bla
    chown 1001: /tmp/bla

especially as:
    chown me /tmp/bla
    chown 1001 /tmp/bla
are both possible and provide the same result.

So for the trailing ":" case it should be (flexibly/convieniently) work
the same, no ?

Tormen




Information forwarded to bug-coreutils@HIDDEN:
bug#15945; Package coreutils. Full text available.

Message received at 15945 <at> debbugs.gnu.org:


Received: (at 15945) by debbugs.gnu.org; 21 Nov 2013 16:25:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 11:25:35 2013
Received: from localhost ([127.0.0.1]:36969 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VjX4O-0007U1-PR
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:25:33 -0500
Received: from mail-wi0-f170.google.com ([209.85.212.170]:52251)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <quickhelp@HIDDEN>) id 1VjWtr-00079Y-Cx
 for 15945 <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:14:39 -0500
Received: by mail-wi0-f170.google.com with SMTP id f4so320599wiw.5
 for <15945 <at> debbugs.gnu.org>; Thu, 21 Nov 2013 08:14:33 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=message-id:date:from:user-agent:mime-version:to:subject:references
 :in-reply-to:content-type:content-transfer-encoding;
 bh=RF4XN2TCXmztTJOit05A6wx4zge08EsokvcN1JEegHA=;
 b=Xxzgq18FVLGdNQUnZf6nIRX/nJRn/Wh5WubfiVdZ/9qfArKaS/MfzDsG4K5pXEIM3K
 SuXEt/CJhAg/r6bUVEAWZ3zi22PE/iNs4GKZ9n+LH7dqr6FZzTvK3/i+b8pRgs/7/2mS
 n7W5QzUX29RciHJGrGltXSwaFnLivmB7AJfGNy5D75a8q5XFE7afC0cUeGmvkzmCAiGQ
 Vd+6TvOJ2le4DA+x5W2YQmnHOEQk7uiAC7/9lXPvH35ve2MXr+HLsH6BhtUPzREtYm21
 no2ebvIOaFBAANc/WXyJCfALFp2BxOVcbt1smDaYH6ZN/Ng2/eZmtHqChKxYPJ3fHFQt
 ZxDA==
X-Received: by 10.180.90.65 with SMTP id bu1mr6470218wib.15.1385050473433;
 Thu, 21 Nov 2013 08:14:33 -0800 (PST)
Received: from [192.168.192.168] (74.235.31.109.rev.sfr.net. [109.31.235.74])
 by mx.google.com with ESMTPSA id
 dn2sm6581169wid.1.2013.11.21.08.14.32 for <multiple recipients>
 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
 Thu, 21 Nov 2013 08:14:32 -0800 (PST)
Message-ID: <528E3174.6020407@HIDDEN>
Date: Thu, 21 Nov 2013 17:14:44 +0100
From: Tormen <quickhelp@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:17.0) Gecko/20131103 Icedove/17.0.10
MIME-Version: 1.0
To: 15945 <at> debbugs.gnu.org
Subject: Re: bug#15945: closed (Re: bug#15945: chown: Does now allow setting
 user and users login group with numerical user ID)
References: <528E2C8B.4080708@HIDDEN> <528DF390.5010302@HIDDEN>
 <handler.15945.D15945.138504923718639.notifdone <at> debbugs.gnu.org>
In-Reply-To: <handler.15945.D15945.138504923718639.notifdone <at> debbugs.gnu.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 15945
X-Mailman-Approved-At: Thu, 21 Nov 2013 11:25:28 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Dear GNU team,

But why is not possible for "chown 1001: /tmp/bla"
to resolve 1001 to "me"
and then do the same than "chown me: /tmp/bla" ?

(I guess internally chown will do the reverse lookup (me -> 1001), when
performing a "chown me: /tmp/bla")

Could you please be so kind to explain the "why not" ?


==============================================


Wording in "man chown":

DESCRIPTION
       This manual page documents the GNU version of chown.  chown
changes the
       user and/or group ownership of each given file.  If only  an 
owner  (a
       user  name or numeric user ID) is given, that user is made the
owner of
       each given file, and the files' group is not changed.  [1] If the
owner  is
       followed  by  a  colon  and a group name (or numeric group ID),
with no
       spaces between them, the group ownership of the  files  is 
changed  as
       well.  [2] If a colon but no group name follows the user name,
that user is
       made the owner of the files and the group of the files  is 
changed  to
       that  user's  login  group.   If the colon and group are given,
but the
       owner is omitted, only the group of the files is changed; in this
case,
       chown  performs  the same function as chgrp.  If only a colon is
given,
       or if the entire operand is empty, neither the owner nor the 
group  is
       changed.

[1] At this point "owner" is referenced as "name or numeric ID".

[2] At this point you do not reprecise "owner" but only state about the
additional colon ":" -- so one must expect "owner" still to be "name or
numeric ID".


Best,

Tormen


On 21/11/13 16:54, GNU bug Tracking System wrote:
> Your bug report
>
> #15945: chown: Does now allow setting user and users login group with numerical user ID
>
> which was filed against the coreutils package, has been closed.
>
> The explanation is attached below, along with your original report.
> If you require more details, please reply to 15945 <at> debbugs.gnu.org.
>





Information forwarded to bug-coreutils@HIDDEN:
bug#15945; Package coreutils. Full text available.

Message received at 15945 <at> debbugs.gnu.org:


Received: (at 15945) by debbugs.gnu.org; 21 Nov 2013 16:11:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 11:11:01 2013
Received: from localhost ([127.0.0.1]:36900 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VjWqK-0006Tm-LX
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:11:01 -0500
Received: from mailgw1.uni-kl.de ([131.246.120.220]:59118)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <auerswal@HIDDEN>) id 1VjWqG-0006Sl-Nk
 for 15945 <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:10:57 -0500
Received: from sushi.unix-ag.uni-kl.de (sushi.unix-ag.uni-kl.de
 [IPv6:2001:638:208:ef34:0:ff:fe00:65])
 by mailgw1.uni-kl.de (8.14.3/8.14.3/Debian-9.4) with ESMTP id rALGAtnc013676
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
 Thu, 21 Nov 2013 17:10:55 +0100
Received: from sushi.unix-ag.uni-kl.de (ip6-localhost [IPv6:::1])
 by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Debian-4) with ESMTP id
 rALGAs4q030611
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
 Thu, 21 Nov 2013 17:10:54 +0100
Received: (from auerswal@localhost)
 by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Submit) id rALGAs8p030608;
 Thu, 21 Nov 2013 17:10:54 +0100
Date: Thu, 21 Nov 2013 17:10:54 +0100
From: Erik Auerswald <auerswal@HIDDEN>
To: 15945 <at> debbugs.gnu.org, eblake@HIDDEN, quickhelp@HIDDEN
Subject: Re: bug#15945: chown: Does now allow setting user and users login
 group with numerical user ID
Message-ID: <20131121161054.GB7835@HIDDEN>
References: <528DF390.5010302@HIDDEN>
 <528E2C8B.4080708@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <528E2C8B.4080708@HIDDEN>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Spam-Score: -2.8 (--)
X-Debbugs-Envelope-To: 15945
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.8 (--)

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




Information forwarded to bug-coreutils@HIDDEN:
bug#15945; Package coreutils. Full text available.

Message received at 15945 <at> debbugs.gnu.org:


Received: (at 15945) by debbugs.gnu.org; 21 Nov 2013 16:09:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 11:09:40 2013
Received: from localhost ([127.0.0.1]:36896 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VjWp2-0006Mg-0C
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:09:40 -0500
Received: from mx1.redhat.com ([209.132.183.28]:37980)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eblake@HIDDEN>) id 1VjWoy-0006MT-Ni
 for 15945 <at> debbugs.gnu.org; Thu, 21 Nov 2013 11:09:38 -0500
Received: from int-mx02.intmail.prod.int.phx2.redhat.com
 (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
 by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rALG9ZYR013765
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Thu, 21 Nov 2013 11:09:35 -0500
Received: from [10.3.113.132] (ovpn-113-132.phx2.redhat.com [10.3.113.132])
 by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id
 rALG9Y2g011796; Thu, 21 Nov 2013 11:09:34 -0500
Message-ID: <528E303E.3090308@HIDDEN>
Date: Thu, 21 Nov 2013 09:09:34 -0700
From: Eric Blake <eblake@HIDDEN>
Organization: Red Hat, Inc.
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:24.0) Gecko/20100101 Thunderbird/24.1.0
MIME-Version: 1.0
To: 15945 <at> debbugs.gnu.org, quickhelp@HIDDEN
Subject: Re: bug#15945: chown: Does now allow setting user and users login
 group with numerical user ID
References: <528DF390.5010302@HIDDEN> <528E2C8B.4080708@HIDDEN>
In-Reply-To: <528E2C8B.4080708@HIDDEN>
X-Enigmail-Version: 1.6
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="kg5l5AdvdK3Xd92uo5OncIGnJ2Gnoor8r"
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
X-Spam-Score: -5.5 (-----)
X-Debbugs-Envelope-To: 15945
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.5 (-----)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--kg5l5AdvdK3Xd92uo5OncIGnJ2Gnoor8r
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

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]?

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


--kg5l5AdvdK3Xd92uo5OncIGnJ2Gnoor8r
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJSjjA+AAoJEKeha0olJ0NqwUoH/2p2bDqOoYwru9pivwFbDe1b
1Di5uMyimR6U4ioFFp7ZU2xPAEqiBsXm8Gn5Bgk6mPDJaJrzCD8Z0E8O/0ld7w/H
xs9DD1+mMubAbZ4V9H+s05y4TKYa33TnppxHQv06jttdvCbh7fph+t3edZVyn8Do
uL+8/SZ1U/Mb5c/TCJZbt3Go6NEczrx/7MYnn1eWPT+W1wryakPjBJnjODgws8Ac
BeYOgjtsnZHM9fjsb9HcEMQJT1rYPDQJPJ53I8WOR5ahHzopEhSzrZ2vJDIl/RmC
/bpXm/iJLJwYHJqZxc7n0u4zmuLZULDZ8ixBGX/5pN41+H4WjLKha1DZGQZsFfQ=
=96vs
-----END PGP SIGNATURE-----

--kg5l5AdvdK3Xd92uo5OncIGnJ2Gnoor8r--




Information forwarded to bug-coreutils@HIDDEN:
bug#15945; Package coreutils. Full text available.

Message received at 15945-done <at> debbugs.gnu.org:


Received: (at 15945-done) by debbugs.gnu.org; 21 Nov 2013 15:53:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 10:53:57 2013
Received: from localhost ([127.0.0.1]:36877 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VjWZo-0004qX-54
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 10:53:56 -0500
Received: from mx1.redhat.com ([209.132.183.28]:8116)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eblake@HIDDEN>)
 id 1VjWZl-0004qG-AO; Thu, 21 Nov 2013 10:53:54 -0500
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
 (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
 by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rALFrpiv017129
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Thu, 21 Nov 2013 10:53:51 -0500
Received: from [10.3.113.132] (ovpn-113-132.phx2.redhat.com [10.3.113.132])
 by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 rALFropj009844; Thu, 21 Nov 2013 10:53:50 -0500
Message-ID: <528E2C8B.4080708@HIDDEN>
Date: Thu, 21 Nov 2013 08:53:47 -0700
From: Eric Blake <eblake@HIDDEN>
Organization: Red Hat, Inc.
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:24.0) Gecko/20100101 Thunderbird/24.1.0
MIME-Version: 1.0
To: Tormen <quickhelp@HIDDEN>, 15945-done <at> debbugs.gnu.org
Subject: Re: bug#15945: chown: Does now allow setting user and users login
 group with numerical user ID
References: <528DF390.5010302@HIDDEN>
In-Reply-To: <528DF390.5010302@HIDDEN>
X-Enigmail-Version: 1.6
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="imujg6OXf9IB7akXQNsMKXs0hi8khXKRv"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
X-Spam-Score: -5.5 (-----)
X-Debbugs-Envelope-To: 15945-done
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.5 (-----)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--imujg6OXf9IB7akXQNsMKXs0hi8khXKRv
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

tag 15945 notabug
thanks

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

>=20
> I think I just found a bug in chown... \o/ ;)
>=20
> I tried:
> 	chown 1001: /tmp/bla
>=20
> 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

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


--imujg6OXf9IB7akXQNsMKXs0hi8khXKRv
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJSjiyMAAoJEKeha0olJ0Nqzk4H/2P+Ylq6+U87kPjEqzuIzxmT
b//ZWRhrBDI9ssq2q5Jz1+yYag7LqeKKn9mo06YUpjJ18iF6Wu9uwk08kfhTQxfi
wcIsd9ItOCiO93mbfJhRX8U6lpAbv7y3dnyux6HyX8JGucq4X3egcqOy31kK5euv
5akjYSm3ANbmRU1dIQJH9PZt/myGyL3TPv6ogQNg/qp3fuq6DFWK0k1ucHjMGeDH
AH44NodAyLDcEsCSnU3+XPyBYohi9tuaMK/suFwcy8kZFKE1bikWwrvVJIlKH98e
2swsBUwlu5uta2lY8s/4UWePtLjrSz2WM0eGeuY2dlrUiwAEUpdRUptqTzF1crw=
=9B/3
-----END PGP SIGNATURE-----

--imujg6OXf9IB7akXQNsMKXs0hi8khXKRv--




Notification sent to Tormen <quickhelp@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Eric Blake <eblake@HIDDEN>:
You have taken responsibility. Full text available.
Added tag(s) notabug. Request was from Eric Blake <eblake@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 21 Nov 2013 15:17:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 21 10:17:45 2013
Received: from localhost ([127.0.0.1]:36842 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VjW0n-0003sb-2L
	for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 10:17:45 -0500
Received: from eggs.gnu.org ([208.118.235.92]:47434)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <quickhelp@HIDDEN>) id 1VjSmo-0004ol-6n
 for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 06:51:06 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <quickhelp@HIDDEN>) id 1VjSma-0008B6-Ot
 for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 06:51:01 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:40218)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <quickhelp@HIDDEN>) id 1VjSma-0008B1-Bt
 for submit <at> debbugs.gnu.org; Thu, 21 Nov 2013 06:50:52 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49122)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <quickhelp@HIDDEN>) id 1VjSmR-000656-Tt
 for bug-coreutils@HIDDEN; Thu, 21 Nov 2013 06:50:52 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <quickhelp@HIDDEN>) id 1VjSmJ-00088a-89
 for bug-coreutils@HIDDEN; Thu, 21 Nov 2013 06:50:43 -0500
Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:34818)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <quickhelp@HIDDEN>) id 1VjSmJ-00088M-0p
 for bug-coreutils@HIDDEN; Thu, 21 Nov 2013 06:50:35 -0500
Received: by mail-wi0-f179.google.com with SMTP id ez12so907397wid.0
 for <bug-coreutils@HIDDEN>; Thu, 21 Nov 2013 03:50:33 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=message-id:date:from:user-agent:mime-version:to:subject
 :content-type:content-transfer-encoding;
 bh=Gpf7X8PXTyN0MrClgdLJn50xdQJFLnLpL2NwrgLkUuQ=;
 b=iXYCrRnmflZPyJwVKo03Bnu4WTMwlDi8LQcO6gjSITV6ygAVWAwvT+KdbCBwTQOcXK
 wADu6kFtVRI8bCVivZZJu5C/kq5oRNZqdJezai/6MhH09ML049JvmJOET4uA62hmKT+4
 i5GmHAAJsKMZll843puhiyLNY88dSUBDTK82kTZz+/Zbmp+1OlKbvdDrNNL8dNA3TZeL
 oUKc9fcZG7HIT+61YXLbr23TOgVVzzhtg6rj2BNDLXYDofaCZD11KGv02u1TG5StN6YG
 CVJt5h/63rcsTUUQkU+5bxUTyFWQoCKpRekZ/14YSNai2/SurmUhuJsWcswP/bcuSGkP
 W5gw==
X-Received: by 10.180.89.98 with SMTP id bn2mr29644915wib.63.1385034633497;
 Thu, 21 Nov 2013 03:50:33 -0800 (PST)
Received: from [192.168.192.168] (74.235.31.109.rev.sfr.net. [109.31.235.74])
 by mx.google.com with ESMTPSA id
 ll10sm4455370wic.9.2013.11.21.03.50.32 for <multiple recipients>
 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
 Thu, 21 Nov 2013 03:50:33 -0800 (PST)
Message-ID: <528DF390.5010302@HIDDEN>
Date: Thu, 21 Nov 2013 12:50:40 +0100
From: Tormen <quickhelp@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:17.0) Gecko/20131103 Icedove/17.0.10
MIME-Version: 1.0
To: bug-coreutils@HIDDEN
Subject: chown: Does now allow setting user and users login group with
 numerical user ID
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 21 Nov 2013 10:17:43 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

Dear Gnu Team,

First off: Thanks for existing!! :)))

I think I just found a bug in chown... \o/ ;)

Details about my GNU/Linux system:
	Debian wheezy stable 7.2

	dpkg -S /bin/chown
	coreutils: /bin/chown

	dpkg -l|grep coreutils
	ii  coreutils      8.13-3.5    amd64   GNU core utilities

	uname -a
	Linux seven 3.10-0.bpo.3-amd64 #1 SMP Debian 3.10.11-1~bpo70+1
(2013-09-24) x86_64 GNU/Linux

	echo $SHELL
	/bin/zsh

I tried:
	chown 1001: /tmp/bla

Leading to:
	chown: invalid spec: `1001:'

But as 1001 == "me", it should have done a:
	chown me: /tmp/bla
(which works just fine).

Is this a bug or a feature ?

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

Best,

Tormen




Acknowledgement sent to Tormen <quickhelp@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to bug-coreutils@HIDDEN:
bug#15945; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.