Here are the SSH commands to fix your permissions on a mass level:

    find ~/public_html -type d -exec chmod 755 {} \;

    find ~/public_html -type f -exec chmod 644 {} \;

Basically, the format is to find, or look, in the path of ~(which means home) and then in public_html. (If you want to look in a different directory, you can change this. e.g. ~/public_html/myblog) And then it looks for the document type, be it directory (d) or file (f), and executes the chmod(change mode) command to change the permissions on all results.