[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Re:Help Navigating Directories
- Subject: Re: [cobalt-users] Re:Help Navigating Directories
- From: Larry Smith <lesmith@xxxxxxxxx>
- Date: Thu Feb 21 22:37:04 2002
- Organization: ECSIS.NET
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
INRE Re: [cobalt-users] Re:Help Navigating Directories:
> > Not really, but what I do (generally just from command line, but this
>
> could
>
> > be written to a file and made a "script") is the following:
> > ============ CUT HERE ============================
> > for fn in `find . -print`
> > do
> > if [ -d $fn ]
> > then
> > chmod 775 $fn
> > else
> > chmod 664 $fn
> > fi
> > done
> > ============ CUT HERE ============================
> Larry,
> Sorry to be thick-skulled, but you said you usually do this from the
> command line. Steve Werby alluded to some fancy one-line commands as well,
> can you combine the script above into a one line command that could be
> issued? Is that possible?
> Thanks again for all your help,
Brandon
Sure, but doing this "off the cuff" it will be two command lines vice one:
The first will change the mode of _all_ directories to 775:
find . -type d -exec chmod 775 {} ";"
and the second changes all "files" to mode 664:
find . -type f -exec chmod 664 {} ";"
Now the real "issue" is that if one also uses FrontPage with this website,
then the directories _really_ need to be mode 2755 vice 775 or possibly 2775
but you can easily change the "mode" above to whatever such as:
find . -type d -exec chmod 2775 {} ";"
which changes all directories (from your _current_ location) to mode 2775
(set GID).
Larry Smith
SysAd ECSIS.NET
sysad@xxxxxxxxx