On Mon, Aug 26, 2002 at 02:56:54PM -0600, Brashers, Bart -- MFG, Inc. wrote:
> 
> I did this because people were constantly forgetting to chmod files they
> created.  Setting umask to 002 would also make files they create in their
> own home directories (/home/user) public, which is not right.  I don't know
> of a way to set umask to 022 for some directories and not for others.  The
> man page for chmod doesn't list a switch like --preserve-ctimes.  
> 

You can use something like 

find . -type d ! -perm 777 -print0 | xargs -0 chmod 777 
find . -type f ! -perm 666 -print0 | xargs -0 chmod 777 

and only change necessary permissions. Probably needs GNU findutils

AFAIK GNUtar uses ctime, because ctime is the only timestamp
which cannot be set backwards.

  Ciao
     Dietmar
-- 
 Alles Gute / best wishes  
     Dietmar Goldbeck                E-Mail: [EMAIL PROTECTED]
Reporter (to Mahatma Gandhi): Mr Gandhi, what do you think of Western
Civilization?  Gandhi: I think it would be a good idea.

Reply via email to