Find and chmod

Find files and set permissions to 644.

$ find / -type f -perm 0777 -print -exec chmod 644 {} \;

Find directories and set permissions to 755.

$ find / -type d -perm 777 -print -exec chmod 755 {} \;
Comments