From owner-freebsd-questions@FreeBSD.ORG Mon Sep 10 16:28:18 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38F2E16A41B for ; Mon, 10 Sep 2007 16:28:18 +0000 (UTC) (envelope-from philip@ridecharge.com) Received: from exhub015-1.exch015.msoutlookonline.net (exhub015-1.exch015.msoutlookonline.net [207.5.72.93]) by mx1.freebsd.org (Postfix) with ESMTP id EDB9B13C500 for ; Mon, 10 Sep 2007 16:28:17 +0000 (UTC) (envelope-from philip@ridecharge.com) Received: from philip.hq.rws (74.93.213.161) by smtpx15.msoutlookonline.net (207.5.72.103) with Microsoft SMTP Server (TLS) id 8.0.730.1; Mon, 10 Sep 2007 09:18:07 -0700 Message-ID: <46E56E3E.8070704@ridecharge.com> Date: Mon, 10 Sep 2007 12:18:06 -0400 From: "Philip M. Gollucci" Organization: Rideray Inc. User-Agent: Thunderbird 2.0.0.4 (X11/20070703) MIME-Version: 1.0 To: Zbigniew Szalbot References: <94136a2c0709100856q768b101as96e1e6d16312d374@mail.gmail.com> In-Reply-To: <94136a2c0709100856q768b101as96e1e6d16312d374@mail.gmail.com> X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Cc: "freebsd-questions@freebsd.org" Subject: Re: chmod / files and directories X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2007 16:28:18 -0000 Zbigniew Szalbot wrote: > Hello, > > 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 . -type d -exec chmod 755 {} \; find . -type f -exec chmod 644 {} \; You could also probably use mtree but you'd need to make the config file first. -- ------------------------------------------------------------------------ Philip M. Gollucci (philip@riderway.com) 323.219.4708 Senior System Admin - Riderway, Inc. http://riderway.com 1024D/EC88A0BF 0DE5 C55C 6BF3 B235 2DAB B89E 1324 9B4F EC88 A0BF Work like you don't need the money, love like you'll never get hurt, and dance like nobody's watching.