set permission 664 dir and 755 file linux

- Posted in Linux by

To change all the directories to 755 (drwxr-xr-x):

find /dir/target/folder -type d -exec chmod 755 {} \;

To change all the files to 644 (-rw-r--r--):

find /dir/target/files -type f -exec chmod 644 {} \;

_https://stackoverflow.com/questions/3740152/how-do-i-change-permissions-for-a-folder-and-all-of-its-subfolders-and-files-in