how to change files in directory let say /home/demo from permission 777 to 755?
you need to know these commands:
1. change permission
chmod -R 0755 /home/demo
2. find permission with 777
find /home/demo -perm 777 -print
Combine these two commands, you can now change all files from permission 777 to permission 755.
find /home/demo -perm 777 -print -exec chmod 755 {} \;