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 {} \;
Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *