Notice: Undefined index: rcommentid in /home/www/dustinbolton/public_html/wp-content/plugins/wp-recaptcha/recaptcha.php on line 481 Notice: Undefined index: rchash in /home/www/dustinbolton/public_html/wp-content/plugins/wp-recaptcha/recaptcha.php on line 482 Notice: get_theme_data is deprecated since version 3.4! Use wp_get_theme() instead. in /home/www/dustinbolton/public_html/wp-includes/functions.php on line 2841 Notice: Undefined variable: show_stats in /home/www/dustinbolton/public_html/wp-content/plugins/stats/stats.php on line 1384 Notice: Undefined index: woo_button_color in /home/www/dustinbolton/public_html/wp-content/themes/continuum/includes/theme-actions.php on line 60

Uncategorized

WordPress + Xampp on Mac Update Permissions Problem

If you are running WordPress on OS X using XAMPP for local development then you likely have tried to upload core or a plugin and encountered the following error while prompted for FTP Connect Information:

To perform the requested action, WordPress needs to access your web server.

This is because by default XAMPP runs as the user `nobody` on Mac and this causes some permissions issues. Additionally WordPress prior to upgrading writes a file to the system and then checks to see which user wrote the file. If this file does not match the user running PHP it will refuse to upgrade, even if write permissions existed. chmod 777 is not sufficient to get past this; you must have the correct user as well. I don’t know why they did this and if there’s a technical reason for it, but it’s annoying.

The solution: Edit your httpd.conf to run as your username for the user and staff for the group.

Open httpd.conf in TextEdit:

sudo open -e /Applications/XAMPP/xamppfiles/etc/httpd.conf

Change:

User nobody
Group nogroup

To:

User your_mac_username
Group staff

Restart Xampp and this should correct the problem; you can verify it worked by running in a .php file.

If you still encounter issues you can check a couple of other things. First verify ownership (most likely problem):

sudo chown -R your_mac_username:staff /path_to_webroot/www/

Next confirm permissions (you can change 777 if you need higher security):

sudo chmod -R 777 /path_to_webroot/www/

10 Responses to “WordPress + Xampp on Mac Update Permissions Problem”

  1. On December 13, 2011 at 12:41 am kenny responded with... #

    I over came this problem long ago by using AMPPS instead of XAMPP. :D
    It is a promising product i feel.

    http://www.ampps.com

  2. On June 7, 2012 at 5:19 am Armando responded with... #

    Thank!! Perfect!! Run ok!!

  3. On November 19, 2012 at 4:07 pm Phil responded with... #

    Awesome. This has been pestering my for a while now. Thanks for the a very succinct and effective solution!

    Cheers

  4. On January 1, 2013 at 9:05 am Nicola Elvin responded with... #

    Thank you this worked for me.

  5. On April 6, 2013 at 4:22 am monjurul hoque responded with... #

    i m new in mac and can’t find how to give write permission to all folder or give full access to users? please help me. thanks

  6. On April 26, 2013 at 4:42 pm Dustin responded with... #

    Open up the “Terminal” app and do the following:

    First verify ownership (most likely problem):

    sudo chown -R your_mac_username:staff /path_to_webroot/www/

    Next confirm permissions (you can change 777 if you need higher security):

    sudo chmod -R 777 /path_to_webroot/www/

  7. On June 28, 2013 at 12:34 am Jitendra responded with... #

    Thanks. It’s works. Save my lots of time.

  8. On October 22, 2013 at 10:04 am David Pratt responded with... #

    Worked a treat!

  9. On December 18, 2013 at 12:27 pm JR responded with... #

    Thanks! This worked. Oddly enough it didn’t matter what I put for the username but the group name was vital for this to work properly.

  10. On June 3, 2014 at 11:10 am Brennan responded with... #

    FINALLY! A post that actually addresses the root of the issue. Thank you so much for posting this

Add your response

Notice: Undefined index: rerror in /home/www/dustinbolton/public_html/wp-content/plugins/wp-recaptcha/recaptcha.php on line 401