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 
Posted on

Mac OS is displaying Access Forbidden on my site

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

This issue can be caused by several things, such as wrong permissions or missing configurations on your httpd file.

Open your terminal and copy and paste the following (enter your computer password when promoted):

Then open the following file with your text editor:

/Applications/PilotKit/Sites/config/OSX/httpd.conf, and make sure the following rules exists:

Then simply restart apache > sudo apachectl restart

Posted on

How to reset MySQL Password in Mac OS

1.  Stop the mysqld server.  Typically this can be done by from ‘System Preferences’ > MySQL > ‘Stop MySQL Server’

2.  Start the server in safe mode with privilege bypass

From a terminal:

Type the following:

3.  In a new terminal window:

Type the following, line by line:

4.  Close Terminal, and stop the mysql server again and restart it.