Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just recently deployed a LAMP stack that came as a package for Linode (a VPS host), I can successfully run Apache 2 but the process and all my files within are owned by root. On my shared web host I could run as nobody or similar to help restrict access, how can I do this myself on my VPS?

I think the steps would be:
- Create user apache2
- Write in httpd.conf to use apache2?
- recursively chown all my files to apache2.

I simply can not find a solution except to use another package and have it installed like that, I would really enjoy some guidence on this. Thank you.

share|improve this question
up vote 1 down vote accepted

The User directive sets the user httpd runs as, if for some reason the distro doesn't set it in its package.

share|improve this answer
Awesome, it is ran under nobody now. Should I chown everything in /srv/www/ to nobody now? – John R. Dec 5 '10 at 6:50
If that makes sense in your situation, sure. Don't forget to set Group as well. – Ignacio Vazquez-Abrams Dec 5 '10 at 6:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.