MacOS Localhost Permissions for Apache

Are you receiving the dreaded “Connection Information” permission issue on your local Mac OS X environment? You’re not alone – and thankfully there is a simple solution to this issue.

You are receiving this error because the default webserver user which runs httpd is known as _www, which is not the user in your local account. If you’re the only person that uses your machine, you can change the user to fix the permission issue.

In the terminal, type the following and hit enter:

This will return a string of information, however the only information you need is the primary user uid and group gid names.
uid=501(admin) gid=20(staff)

Once you have this information, you will need to edit your httpd.conf file. Type the following:
sudo nano /etc/apache2/httpd.conf You’ll likely need to type your admin password to edit his file.

Hit Ctrl+W to search the file for “User “. This will take you directly to the place in the file where you need to edit information.

You can see in this file that I commented out the existing user and group with the # sign.  Below that I entered the User and Group from the information I found in step 2.

You need to restart apache for the change to take effect.
sudo apachectl restart

Congratulations, you are now running httpd as your local account.

Leave a Reply

Your email address will not be published. Required fields are marked *