From owner-freebsd-questions@FreeBSD.ORG Mon Sep 10 16:31:52 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 48B3116A417 for ; Mon, 10 Sep 2007 16:31:52 +0000 (UTC) (envelope-from shantanoo@gmail.com) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.191]) by mx1.freebsd.org (Postfix) with ESMTP id F11E013C459 for ; Mon, 10 Sep 2007 16:31:51 +0000 (UTC) (envelope-from shantanoo@gmail.com) Received: by rv-out-0910.google.com with SMTP id l15so1022733rvb for ; Mon, 10 Sep 2007 09:31:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:in-reply-to:references:mime-version:x-gpgmail-state:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; bh=XaRm2NIlh7H1QN3GipuZ7zddnKPCYvhA9z2sn2xEeIY=; b=lDG2V2rL+aRG8do6Ilc7FZAKAj3JyODO1BThtEHSwu8dU94mWXC1IgjwqahGkg00HqJ6BTfwj4VR1I5Us6IH30sL2MLMcr2vgcIgpP0bDjLLk9ZWT/SFNzSR4VmCEBR0gDc+UcCwONhQ0DncnpHjhRKUZ0LVxoEW2GnPXEIZ3tA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:in-reply-to:references:mime-version:x-gpgmail-state:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=BtSIvf1l9GK7EBVxNbE0AsYKcvAMhQnGhGm7Lls3Fc9vdCMBqMPiolwM4KUVAd9vHTYE1VSx33W9TPxjcD9PAPFt6UaXvtVpsbBVInsQfLiForEZ987ctM1ocQqdXFHBVtumhTzYuOZeT0HmOl+fbJe3/n9HQlBsKnn5RxrxnfA= Received: by 10.141.185.3 with SMTP id m3mr1914854rvp.1189441911048; Mon, 10 Sep 2007 09:31:51 -0700 (PDT) Received: from ?192.168.0.3? ( [121.247.78.27]) by mx.google.com with ESMTPS id g39sm8101675rvb.2007.09.10.09.31.48 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 10 Sep 2007 09:31:50 -0700 (PDT) In-Reply-To: <20070910161006.GB20159@catflap.slightlystrange.org> References: <94136a2c0709100856q768b101as96e1e6d16312d374@mail.gmail.com> <20070910160607.GA20159@catflap.slightlystrange.org> <20070910161006.GB20159@catflap.slightlystrange.org> Mime-Version: 1.0 (Apple Message framework v752.3) X-Gpgmail-State: !signed Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Shantanoo Mahajan Date: Mon, 10 Sep 2007 22:01:35 +0530 To: Daniel Bye X-Mailer: Apple Mail (2.752.3) 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:31:52 -0000 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 '{}' \; To be on safer side. :) regards, shantanoo