bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] new chmod flag: R = r for files, rx for dirs


From: Bob Proulx
Subject: Re: [PATCH] new chmod flag: R = r for files, rx for dirs
Date: Wed, 21 Nov 2001 09:50:05 -0700

> > > This is a result of discussion on lkml on usefulness of x bit on dirs.
> > > It adds new flag to chmod:
> > >
> > > chmod -R a+R dir
> > >
> > > R=(r for files, rx for dirs)

> > Such as the following?  What am I missing?
> >
> >   chmod -R a+rX dir
> 
> This will make all files a+r, all dirs a+rx, _and_ all files with at
> least one x bit set a+rx. I don't want those files to become
> world-executable! What if some of them are SUIDs?

As I read your message it was what I had read that you wanted.  But
now I see that you do not want to make any files executable.  Sorry
about that.  I misread it.  You want everything to get r but
directories only to get x.

In that case, how about the following:

  find dir -type d -print0 | xargs -0 chmod a+rx
  chmod -R a+r

Find is a very powerful filesystem searching program and with xargs
provides a consistent interface to all of the utilities.

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]