Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

thesheep

macrumors regular
Original poster
Mar 27, 2006
131
9
I'm migrating all my stuff from Snow Leopard to Mountain Lion.

I have a new MBP with a fresh install of Mountain Lion and I'm trying to set up my localhost development server as it was under SL.

I've got Apache and PHP working as recommended here. But I'm getting strange permission problems.

Certain folders are giving 403 Forbidden errors when I try to view them in a browser. I noticed the owner of these folders was set to 'root' so I did a chown command to move it to my own username, and also chmod 755 on everything. It still didn't work. I tried chmod 777 on the entire folder structure and I still get the 403 errors. However, if I create a sibling folder, and place an HTML file in there, it displays fine.

~/Sites/clientabc/site/

is shown as

Code:
drwxr-xr-x  25 benhayes staff 850 12 Oct 2010 site

and

~/Sites/clientabc/test/

is shown as

Code:
drwxr-xr-x 3 benhayes staff 102 14 Aug 11:40 test

But anything in 'test' is viewable, but nothing in 'site' is viewable.

Is it possible that I have 2 different usernames that appear the same (both are 'benhayes') but in the underlying OS they are treated as different accounts?
 

thesheep

macrumors regular
Original poster
Mar 27, 2006
131
9
Update: I just ran Repair Disk Permissions in Disk Utility and got a whole load of errors in various places including Library/Java, Library/Preferences, Library/WebServer and System/Library/CoreServices (and several others).

After running repair it tells me that one of the problems cannot be fixed (System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAgent)

Has not fixed the problem with 403 errors.

I am now regretting upgrading to Mountain Lion!
 

thesheep

macrumors regular
Original poster
Mar 27, 2006
131
9
Just in case anyone reads this with a similar problem, I worked out what it was. There was a hidden .htaccess file in the site directory. Since FollowSymLinks was not enabled, Apache was choking on the rewrites in this rule and throwing a 403 error. The lesson here: check Apache error logs before writing a long post about a problem.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.