small medium large xlarge

18 Nov 2011, 21:40
Safa Alai (1 post)

Followed instructions to the letter from Chapter 16 iteration K1, but when I tried got the following message:

———————-Start of message Forbidden

You don’t have permission to access / on this server.

Apache/2.2.20 (Unix) DAV/2 Phusion_Passenger/3.0.9 Server at Port 80

———————-End of message

I’m running on OS X 10.7.2, Rails 3.1.1, Ruby 1.9.2.

I’m very much a beginner at this and any help would be appreciated.

16 Dec 2011, 12:00
Taylor Mock (5 posts)

I’m getting the same. any help here?

16 Dec 2011, 16:12
Sam Ruby (634 posts)

Admittedly a shot in the dark: possible file permission problem?

On Mac machines, the web server runs with the effective user id of _www. Make sure that your directories have both read and execute permissions set, and that your files have the read permission set.

$ ls -ld depot
drwxr-xr-x  18 rubys  staff  612 Jun 21 11:28 depot
16 Dec 2011, 19:12
Taylor Mock (5 posts)

Sam you were exactly right with it being a permission problem. I just didn’t know if it was in my apache config or host or where in the world to look. I finally got it working.

I had to go to system preferences, sharing, file sharing, and make the entire route from documents to my public folder of my rails app read/write. they were all locked up before.

I then went into my apache httpd.conf file and commented out all the DenyFromAll I could find. and whamo! it works! I’m now going through and testing which DenyFromAll I can and can’t comment out as I’m sure some open me up to security risks.

thanks for pointing me in the right direction!

You must be logged in to comment