How to recursively change Directory & File permission to 755 & 644 respectively

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

find /directory_location -type d -exec chmod 755 {} \;

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

find /directory_location -type f -exec chmod 644 {} \;

Leave a Comment