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 want to manage several SVN repositories for a particular vhost in my system. I want those to be owned by a particular user in the system and not by wwwrun/www. The other websites hosted by Apache should be regularly executed by the unprivileged wwwrun/www user.

I'm using worker. How can I tell Apache that every request for a specific vhost must be served impersonating a specific user like I would do in IIS?

(This will also come useful when running FUDforum)

share|improve this question
I found suExec. Does it work only for CGI/SSI or also with DAV_SVN and php-fpm over fcgi? – usr-local-ΕΨΗΕΛΩΝ Sep 27 '12 at 20:48
up vote 1 down vote accepted

There are custom branches of Apache that have a specific directive for running as a given user.

  1. mpm-peruser
  2. mpm-itk

Per-user is very mature and stable for use in production. As this occurs at Apache itself, it means all your modules will run as whoever you desire.

share|improve this answer
I've seen itk is a fork of prefork, and peruser looks like the same. I'm skeptic only because I chose worker because it has better performance with mod-mono. I'm considering your answer but I prefer keeping the worker for performance reasons... if I can! – usr-local-ΕΨΗΕΛΩΝ Sep 27 '12 at 21:13
I can't comment on mod_mono, I'm not familiar with it. But in terms of performance I haven't seen any overheads for PHP based apps. We built a custom branch of per_user that outperforms prefork, like for like. The multiplexers and queues work surprisingly well. – Ben Lessani - Sonassi Sep 27 '12 at 21:17
I've read on (seek for "prefork") that "It is advisable to use the worker MPM with mod_mono. Unfortunately, PHP seems to not necessarily work with the worker MPM, so you may not be able to go this route.". It doesn't mean mono doesn't work, I believe it runs better. Since mod_mono still runs with prefork, I can still move to the peruser module once I've made sure that performs well with both PHP and mono. Also, if I move to peruser, I can throw php-fpm away :) – usr-local-ΕΨΗΕΛΩΝ Sep 27 '12 at 21:48
To be clear: BOTH Mono and PHP run with any worker. I was worried about performance (speed and memory consumption) – usr-local-ΕΨΗΕΛΩΝ Sep 27 '12 at 21:50
I wouldn't give any great concern, the difference is probably negligible anyway. Test with either and see how it actually applies to your situation. – Ben Lessani - Sonassi Sep 27 '12 at 21: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.