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.

Iam looking for a way to run a script with different users. I dont want to hardcode the users in the config... and I found some information that it should be possible that the user goes to... lets say:

Code:

http://localhost/~user1/myscript.cgi

and the script gets executes as user 'user1'.

Does anybody know if that is possible? If not, do I have to make a new vhost config for every user?

Thanks a lot! Greets, Kodak

share|improve this question

1 Answer 1

Apache Doc (http://httpd.apache.org/docs/2.2/suexec.html#usage) states that:

Requests for CGI programs will call the suEXEC wrapper only if they are for a virtual host containing a SuexecUserGroup directive or if they are processed by mod_userdir.

Since your URL is of the kind "~user", which is provided by mod_userdir, I guess suExec is already running.

share|improve this answer
    
Hi! Thanks for your answer! Yes, suExec is running and working with the SuexecUserGroup for the specified user. So when I get this right... this means that when I have mod_userdir configured it will work as I want? –  Blame Oct 22 '13 at 11:16
    
You already have mod_userdir configured, otherwise the /~user/ URL wouldn't work –  Capsule Oct 22 '13 at 13:22
    
It doesn´t work yet... I was just saying I would like to configure it as /~user/. Ok, I will just try it and report back... –  Blame Oct 22 '13 at 14:13
    
Once you will have mod_userdir running, suExec will run too. –  Capsule Oct 28 '13 at 9:38

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.