I have an entire html directory that has permission screwed up when moving to a new server. I would like to chmod all the files AND directories to 755 via ssh, but can't think of the command to do this...can you help?
The answer is: chmod -R 755 * But, I would warn you to take care when executing this. Also, it's not a _great_ idea to have files with the "x" bit on them. It's better to have files "rw-r--r--" (644). Directories need to have "x" in order to be traversed into, so they get "rwxr-xr-x" (755) typically. If you have "x" on the files themselves, then they can be "executed". If there is malicious script code in one of these files, it could potentially be exploited. Rarely does this occur, but best practice is to NOT have "x" on your html files. HTH.
As beejaysea said, CHMOD 755 isn't a good idea for all files on the server. Specially, there are many exploits done through the temporary directories, and be sure to take extreme care while playing with ssh. It could do everything with the server..