Just a note when giving permission for web server.
Permissions are simple. You just have to remember there is read write and execute permission in *nix. You won't need the execute permission in any of the script files but all folders must have execute permission. That leaves you with the read and write permissions. You will need read permission for all the files and folders. You will only need write permission only to the folders and files which need to be changed by the web server. Basically you will need read write and execute permissions for temp folder, and if you are using file upload then the folder where you store the files. You may need to have write permission only to files which needs to be changed by the web server (for simple sites these may not be there).