Re: Permission change - recursive
On Sat, Mar 13, 2004 at 01:12:07PM -0500, Joey Hess wrote:
> Curtis Vaughan wrote:
> > I just noticed that for an entire directory of files and folders, the
> > permissions are not really right.
> >
> > Or maybe it doesn't matter. I went ahead and changed all permission
> > recursively, but feel that permissions should be as follows: for all
> > files 660, whereas for all directories 770. Has anyone written a
> > script that will drill through a directory and change all the
> > permissions in such a manner?
>
> chmod go=rX,u+rw
Of couse your thinking is the best one. But this one seems to have few
flaws to me. It will result in:
...
chmod: too few arguments
Try `chmod --help' for more information.
Original post is asking
for all files 660
for all directories 770
So something like:
chmod -R ug=rwX,o-rwx .
should do the best one liner command to address original poster's request.
Osamu
PS: I do "chmod -R go=rX,u+rw ." more often since this is what I usually
wants for the fixed permissions. So Joey is right except typo :)
~\^o^/~~~ ~\^.^/~~~ ~\^*^/~~~ ~\^_^/~~~ ~\^+^/~~~ ~\^:^/~~~ ~\^v^/~~~ +++++
Osamu Aoki <osamu@debian.org> Brussels Belgium, GPG-key: A8061F32
.''`. Debian Reference: post-installation user's guide for non-developers
: :' : http://qref.sf.net and http://people.debian.org/~osamu
`. `' "Our Priorities are Our Users and Free Software" --- Social Contract
Reply to: