To change all files to 644 i.e. when you are using suphp and you have your files in the wrong permission:
find /home/userid/public_html/directorywheretochangein -type f -print0 | xargs -0 chmod 644
To change all directories to 755 :
find /home/userid/public_html/directorywheretochangein -type d -print0 | xargs -0 chmod 755