If you want to change the permissions of files or folder in bulk then you can use “find” command. You can follow below steps to
if we need to change permission of all directories under folder to 755 then you can run below command:
if you want to change permission of all the files under folder having 777 permission to 644 then use below command:
- You have to change directory for which we need to change the permissions.
- You can change the directory permission to 755 and file permission to the 644, so we have to customize command according to it.
Code:
find . -type f -exec chmod 644 {} \;
Code:
find /home/abc/ -type d -exec chmod 755 {} \;
Code:
find . -type f -perm 777 -exec chmod 644 {} \;