Recursivly chmod all directories


I’ve spent countless hours/minutes changing the permissions on directories after transferring them from our development server to our production server. For security reasons chmod -R is just a bad idea in this case, so I had been going through and changing every directory manually. I don’t know why I never took the time to figure this out before.

find my_root_director/ -type d -exec chmod 777 {} \;

Load up your bash shell and enter the command above, replacing my_root_directory/ with the path to your directory and changing the permissions to those you want to assign. Wait a few milliseconds and blam the all directories contained within the directory you specified will be given the new permission set.