Date: Fri, 20 Dec 2002 14:29:02 +0100 From: Stijn Hoop <stijn@win.tue.nl> To: Andrew Cutler <andrew@1stelement.com> Cc: freebsd-questions@freebsd.org Subject: Re: chown broken?? Message-ID: <20021220132902.GF22383@pcwin002.win.tue.nl> In-Reply-To: <1040390551.921.36.camel@localhost> References: <1040390551.921.36.camel@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
--76DTJ5CE0DCVQemd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Sat, Dec 21, 2002 at 12:22:32AM +1100, Andrew Cutler wrote: > I just hosed one of my boxes by recursively setting all my file > permissions incorrectly: > =09 > $ su > $ cd /data > $ chown -R andrew:wheel * This is all ok. > $ chown -R andrew:wheel .* This isn't. > For some reason the last command was interpreted as: > $ chown -R andrew:wheel /*=20 No, it was interpreted by your shell as: # chown -R andrew:wheel . .. .foo .bar <other files starting with .> Note the second entry, '..'. This translates to the directory above the one you are rooted in, as usual. In effect you recursively chown'ed every directory on your system, just as you asked. > Why does the behaviour of chown change when u r root? It doesn't, only when you try this as a normal user you don't have the permissions to change ownership of /. > Surely this is a bug? No, it isn't. > And what the hell is this crap in the man page about -R: >=20 > -R Change the user ID and/or the group ID for the file > hierarchies rooted in the files instead of just the files > themselves. It is another way of saying that chown will update ownership recursively, although I admit it is worded rather badly. HTH, --Stijn --=20 I really hate this damned machine I wish that they would sell it. It never does quite what I want But only what I tell it. --76DTJ5CE0DCVQemd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+AxseY3r/tLQmfWcRArH5AKCLraVUElF+2HE3og8wXEivYete+ACfaUlk kTTDkLCvifUMefTrUg+7AUg= =VGkc -----END PGP SIGNATURE----- --76DTJ5CE0DCVQemd-- 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?20021220132902.GF22383>