Posted on

How to change the APACHE user and group

You can change the user and group the Apache process runs as from the default _www on your OSX machine which normally comes with limited permission and with no shell access.

If you open Activity Monitor Application, and search for “httpd”, you will see apache is running under _www, in my case is running under my user mvelis.

To begin you will have to find and change the User and Group directive in Apache configuration file.

For OSX: 

Open the httpd.conf file with your favorite text editor and locate the following:

User _www
Group _www

User: you will use your user name instead of _www (you can find your username by opening terminal and typing whoami)

Group: You can their use a group you have previously created, i usually use: staff or  #-1

You will need to restart Apache for the changes to take effect.

You can restart apache using PilotKit or by typing the following in terminal:

sudo apachectl -k restart