How to set file permissions to default in Linux?

In Linux file permissions are as follows.

Files – 644
Folders – 755

Sometimes files and folders found to be in full permissions. Please use the below commands to set it back to default permission

For folders:

find . -type d -exec chmod 755 {} \;

For files:

find . -type f -exec chmod 644 {} \;

Post navigation

Leave a Reply