Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have many VirtualHosts for different users. How can I set UID for PHP process per VirtualHosts?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

If you are using a Linux distribution then you can probably use suPHP. suPHP allows you to run php scripts with the UID/GID of the php file that is being processed.

You will have to ensure that each of your vhosts has a their own UID/GID.

share|improve this answer
    
Thanks, suPHP is exactly what I want. –  Sannis Mar 23 '11 at 15:11

You could run the php scripts as if they were a CGI and use SuexecUserGroup from mod_suexec to specify which user to run the script as.

share|improve this answer

Your Answer

 
discard

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.