1

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

nicondev
  • 131
  • 3

1 Answers1

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.

Capsule
  • 163
  • 1
  • 7
  • 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? – nicondev 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... – nicondev Oct 22 '13 at 14:13
  • Once you will have mod_userdir running, suExec will run too. – Capsule Oct 28 '13 at 09:38