From owner-freebsd-questions@FreeBSD.ORG Mon Sep 10 16:38:41 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 8FC0516A419 for ; Mon, 10 Sep 2007 16:38:41 +0000 (UTC) (envelope-from zszalbot@gmail.com) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.188]) by mx1.freebsd.org (Postfix) with ESMTP id 47D0713C45D for ; Mon, 10 Sep 2007 16:38:41 +0000 (UTC) (envelope-from zszalbot@gmail.com) Received: by rv-out-0910.google.com with SMTP id l15so1024051rvb for ; Mon, 10 Sep 2007 09:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=3qtB7bWDlTMfrwJtQQC1pc/WOhvv/28k79QKm67KfFo=; b=ZA8CJWBtkq+Ob2byhzbj8GSbN+Bo6WgtdeJVYtkMpwmVlDN+RHAFdIhojmgJeNx8R8NSaQgsEhiYdTjm4bQrsNwlyNPuCA4mEquOWc+bvlTKY72LCrLF3YnVSY37g+MSCTrjm022sBKVXaI7jnM+XerJHEDg7fLrDZCHt4MiUHs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=QE7PyvDzZv7Bm1Mz69ZjKWhCEYzr5/YQCGBFAB7eMeLTeY6/G0Mt84Kn+Rq5BZGYIK+gmN79m+MVhIAwnUPrU3JZIB7FXgn6p30eVrYDX1ghHpgiDdoPEbatZXpnBK11MAATJZFMJnMsz0NjRYY0VqhmWeyppO92S3dbcbZjHxc= Received: by 10.141.211.13 with SMTP id n13mr1913926rvq.1189442320585; Mon, 10 Sep 2007 09:38:40 -0700 (PDT) Received: by 10.141.79.9 with HTTP; Mon, 10 Sep 2007 09:38:40 -0700 (PDT) Message-ID: <94136a2c0709100938x2a77d79v8df1b446eda0362c@mail.gmail.com> Date: Mon, 10 Sep 2007 18:38:40 +0200 From: "Zbigniew Szalbot" To: freebsd-questions@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <94136a2c0709100856q768b101as96e1e6d16312d374@mail.gmail.com> <20070910160607.GA20159@catflap.slightlystrange.org> <20070910161006.GB20159@catflap.slightlystrange.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:38:41 -0000 Hello, 2007/9/10, Shantanoo Mahajan : > > On 10-Sep-07, at 9:40 PM, Daniel Bye wrote: > > > On Mon, Sep 10, 2007 at 05:06:07PM +0100, Daniel Bye wrote: > >> On Mon, Sep 10, 2007 at 05:56:12PM +0200, 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! > > > > Sorry, that *should* have been: > > > > # find /usr/local/www/data/wp -type d -exec chmod 755 {} \; > > # find /usr/local/www/data/wp -type f -exec chmod 644 {} \; > > # find /usr/local/www/data/wp -type f -exec chmod 644 '{}' \; > # find /usr/local/www/data/wp -type d -exec chmod 755 '{}' \; Thank you all who have responded - until I memorise it :), I saved it in my favorite commands list. Thanks again! Zbigniew Szalbot