The correct permissions for your files on our CPanel servers are as follows:
600 or 644 PHP Scripts (.php)
755 Non-PHP Scripts (*.cgi, *.pl, *.pm, *.py)
644 Non-Script Files (Images, CSS, HTML, Templates, Etc)
755 All Directories (Any folder below public_html)
Leaving your PHP scripts permissions set to 755 or 777 will leave your site wide open to hackers.
When installing pre-packaged scripts, they might tell you to set the file permissions to 755 or 777 but please just ignore this and use the following above.
If you have a second website on the same server but wish to access files on the original site, you can set the file permissions to 644.