If you're unfamiliar with Unix file permissions, getting permissions right can be frustrating. Unfortunately, it is necessary to be very picky for security reasons.
For most web pages, the most appropriate thing is to ensure that the files are world-readable, and directories are world-readable and world-executable. Commands that can help you achieve this are:
For scripts the web server applies a strict set of criteria. If they are not met, the script will not be run. The most likely error is that somebody else can write to either the directory or the file. Commands to resolve that are: