Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Apr 2004 10:26:07 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Cory Petkovsek <cory@adaptableit.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: changing directory permissions recursively
Message-ID:  <20040409092607.GC33753@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <20040409090351.GB3094@adaptableit.com>
References:  <000501c41df5$519419f0$0200a8c0@satellite> <20040409055515.GA50737@alexis.mi.celestial.com> <407646EB.7020708@geminix.org> <20040409090351.GB3094@adaptableit.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040409092607.GC33753>