Kristopher Matthews wrote:
This is a security nightmare. I would *not* recommend doing any such thing in a user filesystem.You're making the assumption that he LIKES his users. :) On Wed, 18 Feb 2004, Michael Stone wrote:On Wed, Feb 18, 2004 at 02:15:36AM +0100, Javier Fernández-Sanguino Peña wrote:DIR_TO_FIX=/home/groupX GROUP=mygroup PERM=g+rwX find $DIR_TO_FIX -type f -o -type d | xargs chown $GROUP # or chown -hR $GROUP $DIR_TO_FIX find $DIR_TO_FIX -type f -o -type d | xargs chmod $PERM # or chmod -hR $PERM $DIR_TO_FIXThis is a security nightmare. I would *not* recommend doing any such thing in a user filesystem.
hmm, xargs does not use quotes when executing commands. This causes problems with dirs with spaces in name. If user has directory named "dummy root", he can easily get accsess to /root directory.
Ivan