Date: Mon, 10 Sep 2007 17:06:07 +0100 From: Daniel Bye <freebsd-questions@slightlystrange.org> To: freebsd-questions@freebsd.org Subject: Re: chmod / files and directories Message-ID: <20070910160607.GA20159@catflap.slightlystrange.org> In-Reply-To: <94136a2c0709100856q768b101as96e1e6d16312d374@mail.gmail.com> References: <94136a2c0709100856q768b101as96e1e6d16312d374@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 10, 2007 at 05:56:12PM +0200, Zbigniew Szalbot wrote: > Hello, >=20 > I did read man chmod but I am not really wiser. Is there an option to > recursively set 755 permissions for directories and 644 for files? > When I just issue > chmod -R 755 /usr/local/www/data/wp/ > then all files and directories under wp/ are given permissions 755 > which is not what I want. > I can do it manually but since there are manyt subdirectories I > thought I would make my life easier. Many thanks in advance! find(1) is your friend here: # find . -type d -exec chmod 755 {} \; # find . -type f -exec chmod 644 {} \; Dan --=20 Daniel Bye PGP Key: http://www.slightlystrange.org/pgpkey-dan.asc PGP Key fingerprint: D349 B109 0EB8 2554 4D75 B79A 8B17 F97C 1622 166A --0OAP2g/MAC+5xKAE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFG5Wtvixf5fBYiFmoRAkWxAJ91JyQLOiFADcJM77EFvZ6bUZCbrQCgwHva Yw+S6f61VNHhvNFuPU4WZRM= =oLBo -----END PGP SIGNATURE----- --0OAP2g/MAC+5xKAE--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070910160607.GA20159>