Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just installed apache/php5 on ubuntu.When trying to access folders in localhost (via the browser) i got a permission denied page.I tryed to chmod for the files to 755 -R and now i got a 500 error.How can i fix this ?

share|improve this question

Typically your files should be 644 and directories 755. Find is the appropriate tool for this. These command (run form the base of your content) can do this for you

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

Even active code like PHP does not need the executable bit set. Depending on your configuration the executable bit can be used to trigger apache to process your content for server side includes.

The 500 error indicates a server error. This may be a result of problems with active pages.

Check the error log to see which errors are being generated. It is generally located in the same directory as your access log.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.