Using SSH (Putty) > Login as root
enter the following code to Change all permissions for folders from 777 to 755
find /home/*/public_html -type d -exec chmod 755 {} \;
enter the following code to Change all permissions for files from 666 to 644
find /home/*/public_html -type f -exec chmod 644 {} \;
This will change all permissions of files and folders