From owner-freebsd-questions@FreeBSD.ORG Fri Apr 9 02:26:23 2004 Return-Path: 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 7269516A4CE for ; Fri, 9 Apr 2004 02:26:23 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8240F43D3F for ; Fri, 9 Apr 2004 02:26:22 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1])i399Q7pG034238 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 9 Apr 2004 10:26:07 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i399Q7RW034237; Fri, 9 Apr 2004 10:26:07 +0100 (BST) (envelope-from matthew) Date: Fri, 9 Apr 2004 10:26:07 +0100 From: Matthew Seaman To: Cory Petkovsek Message-ID: <20040409092607.GC33753@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Cory Petkovsek , Uwe Doering , freebsd-questions@freebsd.org References: <000501c41df5$519419f0$0200a8c0@satellite> <20040409055515.GA50737@alexis.mi.celestial.com> <407646EB.7020708@geminix.org> <20040409090351.GB3094@adaptableit.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="p2kqVDKq5asng8Dg" Content-Disposition: inline In-Reply-To: <20040409090351.GB3094@adaptableit.com> User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk X-Virus-Scanned: clamd / ClamAV version devel-20040323, clamav-milter version 0.70a cc: Uwe Doering cc: freebsd-questions@freebsd.org Subject: Re: changing directory permissions recursively X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2004 09:26:23 -0000 --p2kqVDKq5asng8Dg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 09, 2004 at 02:03:51AM -0700, Cory Petkovsek wrote: > On Fri, Apr 09, 2004 at 08:47:07AM +0200, Uwe Doering wrote: > > >cd $topdir > > >find . -type d | xargs chmod 755 > >=20 > > In case (potentially) untrusted users have had write permission in this= =20 > > directory tree in the past, a safer alternative would be > >=20 > > find /path/to/tree/root -type d -print0 | xargs -0 chmod 755 >=20 > Please explain the "safer" difference in your eyes, Uwe. Are you thinkin= g the > admin might have ./ in their path? But putting a space in a filename, or by several other means, you can fake the first version of the command into working on directories outside what was intended. However the more usual effect is that the command fails to change the permissions on the whole tree as desired.=20 Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --p2kqVDKq5asng8Dg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAdmwvdtESqEQa7a0RAvdWAJ9TPv0BvnLZhkEoWJP5FjKgxcThBQCggM3a B/D/uX1ZC1jqzOQvfcdfqgY= =Rtxb -----END PGP SIGNATURE----- --p2kqVDKq5asng8Dg--