Re: x bit for dirs: misfeature?

Anton Altaparmakov
2001-11-20T11:22:26Z

At 12:58 20/11/01, vda wrote:
>I'm asking for ability to make a tree _world-readable_ (and
>browsable), i.e. a+r on files and a+rx on dirs.
>There is currently no chmod flag which will do that.

So what? The following two commands do exactly that:

find . -type d -exec chmod a+rx "{}" \;
find . -type f -exec chmod a+r "{}" \;

Just stick them in a shell script and call the script chmod-world-readable
and stop complaining...

You would obviously want to change the "." to be $1 so it is the 1st
argument to the script...

It will be a bit slow and can be optimized endlessly but it will do the
trick and you probably won't be running it that often so speed is not an
issue... And if it is then grab the chmod sources and add the wanted
functionality with a new swich and be done with it.

This is WAY Off Topic for Linux kernel!

Best regards,

Anton

--
"I've not lost my mind. It's backed up on tape somewhere." - Unknown
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS Maintainer / WWW: http://linux-ntfs.sf.net/
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/