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

Re: Umask 002 policy



Once upon a time Cameron Hutchison said...
> 
> To prepare a directory hierarchy for group use, I do the following:
> 
> # chgrp -R $group $dir
> # find $dir -type d -print0 | xargs -0 chmod 2770
> 
> (I usually use mode 2775, but I think you wanted 2770 from your
> description)
> 
> # find $dir -type f -print0 | xargs -0 chmod 660

Upon further reflection, this would be better done as

# find $dir -type f -print0 | xargs -0 chmod g=u,o=-rwx

This will clear permissions for others and set group permissions to the
user permissions. This will preserve executable permissions.



Reply to: