Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Sep 2007 18:38:40 +0200
From:      "Zbigniew Szalbot" <zszalbot@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: chmod / files and directories
Message-ID:  <94136a2c0709100938x2a77d79v8df1b446eda0362c@mail.gmail.com>
In-Reply-To: <A2DB3A06-0AC3-4975-AAD0-75638560AC76@gmail.com>
References:  <94136a2c0709100856q768b101as96e1e6d16312d374@mail.gmail.com> <20070910160607.GA20159@catflap.slightlystrange.org> <20070910161006.GB20159@catflap.slightlystrange.org> <A2DB3A06-0AC3-4975-AAD0-75638560AC76@gmail.com>

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

2007/9/10, Shantanoo Mahajan <shantanoo@gmail.com>:
>
> 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



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