Re: x bit for dirs: misfeature?

From: Anton Altaparmakov (aia21@cam.ac.uk)
Date: Tue Nov 20 2001 - 06:20:06 EST


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/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Nov 23 2001 - 21:00:23 EST