Change Apache user and group



Depending on Linux distribution, Apache web server is normally set to run as the user nobody, www-data or apache. This among other is for security reason, as the default user normally doesn’t have shell login and is normally set to very limited permission.

If for some reason you need to run Apache as different user and group, the trick is to just change the User and Group directive in Apache configuration file, which normally is the /etc/apache2/httpd.conf as the following;

User nobody
Group nobody

To make the changes to take effect, the Apache webserver needs to be restarted first, normally with the following init script;

# /etc/init.d/apache2 restart

Posted on 15.01.2009 and categorized under linux

Comment Form


  • ayaz: Thanks for the tip.
  • TrueColorTech: Awesome Tip, I have been wanting that option for a while now!
  • iGadget: If this would work, it'd be really nice. However, when I use the command described in your post, I get the following error (twice): Could not conne
  • Alan: fedora 10 is so cool and i have fedora 10 too!
  • Kyle: Forgot to swing back by here after finding version 5.1.3 available, posted about it here: http://yokohead.com/2009/01/google-gears-in-firefox-x64-for

Categories