change permissions of all Folders and Subfolders (also works for files)
To set the permissions of all files and subfiles, or folders and subfolders run the following:
Folders: find . -type d -exec chmod 0755 {} \;
- Finds all units that are folders and changes permissions to 755
Files: find . -type f -exec chmod 0644 {} \;
- Finds all units that are files and changes permissions to 644
To set files/folders to different permission values, change the integer after chmod to the value of choice.