We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,695 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Apache Doesn't Have Permission on Ubuntu

Ok, so I have just set up a server using Ubuntu Server 12.04 but I have hit a bit of a brick wall when attempting to view webpages.
I chown'ed the /var/www folder so I could add my files to it and all is working fine from this front but it comes to when I try and display the webpage. My server doesn't seem to like accessing the folders for example in my main folder (/var/www) I have the index and then three other folders, StyleSheets, Resources, and Pages.

When accessing the website, the index.php page displays as if it doesn't have a stylesheet attached to it and when attempting to access one of the folders or pages using http://192.168.0.11/Pages/Login.php I get a 403 Forbidden which if I am not mistaken means that there isn't the appropriate permissions for Apache to view them.

How would I be able to allow Apache access to all the folders?
Thank you

3
Contributors
2
Replies
3 Weeks
Discussion Span
1 Year Ago
Last Updated
4
Views
Question
Answered
AHarrisGsy
Posting Pro in Training
478 posts since Nov 2011
Reputation Points: 48
Solved Threads: 37
Skill Endorsements: 13

Make sure that your chown command has the -R flag for recursive, otherwise it's not going to be able to work.

Shinedevil
Junior Poster
133 posts since Nov 2008
Reputation Points: 18
Solved Threads: 18
Skill Endorsements: 0

chown -R www-data.www-data /var/www/
<SNIPPED URL>

here2serve
Light Poster
27 posts since Nov 2009
Reputation Points: 10
Solved Threads: 4
Skill Endorsements: 0
Question Answered as of 1 Month Ago by Shinedevil and here2serve

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0652 seconds using 2.68MB