I want to make all folders in a directory chmod to 755 and individual files to chmod 644. Is there a way I can use umask (e.g. umask 022) to specify these permissions in the future?
Thanks in advance.
find ~ -type d -exec chmod 755 {} \;
find ~ -type f -exec chmod 644 {} \;
echo umask 0022 > ~/.bashrc # [ this should be in your /etc/profile* already ]
You can solve this then using access control lists. man setaclf
Aside from this and or making a cron script that occasionally goes through and makes sure that everything is chmodded correctly in this directory there is no elegant way to go about this in linux.