Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to start my apache server on my Mac running OS X (10.9) Mavericks. Here is what I did:

  1. Goto terminal
  2. sudo apachectl start
  3. The server started without problem. But I got the following problem when I tried to open the localhost in web browser:

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

Here is my httpd.conf file in my /etc/apache2: (I didn't change anything here)

DocumentRoot "/Library/WebServer/Documents"

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all </Directory>

<Directory "/Library/WebServer/Documents">

    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all


Can anybody advise what could be the cause ? Thanks

share|improve this question
Is it related to my Server application recently installed? I got the same problem when I start the website service in my Server application. – bagusflyer Nov 17 '13 at 4:14
up vote 10 down vote accepted

I run into the same issue. After some goggling I figured that the main issue is that Apache runs as user _www whereas your files probably are under your own user. List the content of your webroot folder in Terminal (ls -l) to see the user and its group.

I found this link which provides a "better solution" instead of "changing the owner" or "changing the permissions":

In short, do this (replace <dir> with the name of your folder):

sudo chmod -R +a '_www allow read,write,delete,add_file,add_subdirectory,file_inherit,directory_inherit' <dir>

Of course, all the glory goes to Francois.

share|improve this answer
I don't know what I did. Then the website suddenly works. I guess it's because I uninstall the "Server" and reinstall it.Anyway, I think your answer should be correct. I'll definitely follow this instruction if I encounter this problem again. Thanks. – bagusflyer Nov 18 '13 at 4:19
This solution seems to work well. – swt83 Sep 12 '14 at 16:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.