I use the following two commands to reset the permissions of files on a public server.  The commands are used together so they are not separated into separate code blocks.  The first line sets the permissions to all of the folders on the server so that they can be opened by guests.  The second line sets the read permission for all of the files on the server.

find ./public_html -type d -exec chmod 755 {} \;
find ./public_html -type f -exec chmod 644 {} \;