Apache, permission denied accessing the web app folder after upgrading OSX to 10.9.2

StackOverflow https://stackoverflow.com/questions/23582635

  •  19-07-2023
  •  | 
  •  

Question

My Apache used to work fine, but I assume that problems came after upgrading OSX to 10.9.2, (anyway not certain about when the problem came) Apache was not working with the current configuration.

I tried apachectl configtest so I found out that the Apache's file structure on my machine was changed, from Library/WebServer/Documents/ to Library/WebServer/Apache Home so I edited the DocumentRoot of httpd.conf to point to the new folder.

But the problem I still cannot fix is about the permission. I got 403 Forbidden, You don't have permission to access / on this server.

Extra Information

I hosted all my web projects at /Users/myname/home_www this folder and it's sub folders belong to _www group, and has 775 access permission. I created a symlink at Library/WebServer/Apache Home (all these setup used to work fine)

I noticed some strange thing that the Library/WebServer/ and its sub folders belong to wheel group, I never paid attention to these folders before that what group they belong to.

OSX: 10.9.2
Apache: 2.2.26

Was it helpful?

Solution

As I said in my case all problems seem to come after upgrading to 10.9.2, these are steps I have done to solve my problems.

  1. Edit DocumentRoot to DocumentRoot "/Library/WebServer/Apache Home"
  2. Edit <Directory> to <Directory "/Library/WebServer/Apache Home">
  3. This step may not be necessary but just in case, brew upgrade
  4. Chenge owner and group of /usr/local/var/mysql/ to *mysql using sudo chown -R _mysql:_mysql /usr/local/var/mysql/, otherwise mysql.server start will fail
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top