Recursive permission change using find

Table of Contents

Permission issues are common in domains hosted on Linux servers and we need to change the permission of multiple files and folders. Changing the permissions of each and every file separately is a tedious and time-consuming job. So here we are discussing how recursive permission change can be done:

For directories #

find <location> -type d -exec chmod 755 {} \;

eg :

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

For files #

find <location> -type f -exec chmod 644 {} \;

Eg:

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

Powered by BetterDocs