Server error 500 due to file permission

0

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 ?

andrei

Posted 2011-10-22T12:42:14.777

Reputation: 156

Answers

2

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.

BillThor

Posted 2011-10-22T12:42:14.777

Reputation: 9 384