From owner-freebsd-questions Fri Dec 20 6:12:41 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 713A037B401 for ; Fri, 20 Dec 2002 06:12:39 -0800 (PST) Received: from mail3.sea.registeredsite.com (mail3.sea.registeredsite.com [66.111.73.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id C240A43EE6 for ; Fri, 20 Dec 2002 06:12:37 -0800 (PST) (envelope-from admin@asarian-host.net) Received: from asarian-host.net (asarian-host.net [216.122.74.112]) by mail3.sea.registeredsite.com (8.12.6/8.12.6) with ESMTP id gBKECUMo023036 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Fri, 20 Dec 2002 09:12:31 -0500 Comments: To protect the identity of the sender, certain header fields are either not shown, or masked. Anonymous email addresses for asarians can be requested by filling in the appropriate form at: https://asarian-host.net/cgi-bin/signup.cgi Received: (from root@localhost) by asarian-host.net (8.11.6/8.11.0) id gBKECUT91822 for freebsd-questions@freebsd.org; Fri, 20 Dec 2002 15:12:30 +0100 (CET) (envelope-from admin@asarian-host.net) Posted-Date: Fri, 20 Dec 2002 15:12:30 +0100 (CET) From: Mark Message-Id: <200212201412.GBKECSM91804@asarian-host.net> Date: Fri, 20 Dec 2002 15:12:17 +0100 X-Authenticated-Sender: admin@asarian-host.net Subject: Re: chown broken?? X-Trace: Uze8iZmNuIq7mcmMpbPGfY3k+qGssPoI3PSAG4w6WceiZMRC9NnWiJiKIKKK7pNZ X-Complaints-To: abuse@asarian-host.net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we are unable to process your complaint Organization: Asarian-host To: "Andrew Cutler" , References: <1040390551.921.36.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Auth: Asarian-host PGP signature iQEVAwUAPgMlTjFqW1BleBN9AQHRxQgAjWBXtA8vhzcAiWkgCHlGmTOCZAb6RCcZ 3sEqVwJVhrV6PiBvCsI9tWNRRbAnNRo6hGgxCugJ/if1QBY5naaifS0q5U1FQq76 oCgWwfKUaU8zceptBOrjTjPDsA/tYbYc/P/FeCEG8lpnbb7M6iQcC09peb1SPtQb /nsoPBuQQQu10x8NU9KevqfSILzDMxcgLvm/RrillcvvNKxLuT/FAiQL1QeCyeWy qpsm1oBgxtHHCW82AW7TADS8U9hlRGoxHX3DmBOn5YkUa1b07CLHgwue0uJ7GH/D rYhxMX9Ajn6NRgXNcjVwqpPuf3JqT7mrF1j6DhUYXX5MEPT8piXvLg== =Bb41 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ----- Original Message ----- From: "Andrew Cutler" To: Sent: Friday, December 20, 2002 2:22 PM Subject: chown broken?? > Hello > > > > I just hosed one of my boxes by recursively setting all my > file permissions incorrectly: > > $ su > $ cd /data > $ chown -R andrew:wheel * > $ chown -R andrew:wheel .* > > > For some reason the last command was interpreted as: > $ chown -R andrew:wheel /* Nope; the recursion includes ".." here: "/" in your case, as others already pointed out. I must say, though, that while I understand this behaviour, one can argue on what exactly "recursive" is to mean here. Intuitively, the definition of "the current sub-directory and all sub-directories below the current directory (and that for each subdirectory)" seems the correct one. Which would exclude "..", as this is not a sub-directory of the current directory, but the parent. But this behavior is not inconsistent; try "cp -R .*", and you will find it does the same. :) - Mark To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message