Date: Fri, 20 Dec 2002 15:12:17 +0100 From: Mark <admin@asarian-host.net> To: "Andrew Cutler" <andrew@1stelement.com>, <freebsd-questions@freebsd.org> Subject: Re: chown broken?? Message-ID: <200212201412.GBKECSM91804@asarian-host.net> References: <1040390551.921.36.camel@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message ----- From: "Andrew Cutler" <andrew@1stelement.com> To: <freebsd-questions@FreeBSD.ORG> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212201412.GBKECSM91804>