PHP4 script execute as particular user...
Does anyone here know how I can get a PHP4 script (running through Apache) to exeucte as a differant user? I do not want to run it as root, but I need to have a particular script execute as a certain user. By default apache runs them as wwwrun:nobody.. THanks Pagan
On Thu, 13 Mar 2003 01:54:10 -0600
Pagan
Does anyone here know how I can get a PHP4 script (running through Apache) to exeucte as a differant user? I do not want to run it as root, but I need to have a particular script execute as a certain user. By default apache runs them as wwwrun:nobody..
You can get a cgi-wrapper script called cgi-wrap to do this. Or you can run the script out of a user's public_html cgi-bin. suexec is enabled by default in Suse, and everything runs as the user if it is in /home/user/public_html. You can even make up a special user just to run the script. -- use Perl; #powerful programmable prestidigitation
Does anyone here know how I can get a PHP4 script (running through Apache) to exeucte as a differant user? I do not want to run it as root, but I need to have a particular script execute as a certain user. By default apache runs them as wwwrun:nobody..
Why do you want to run it as a different user? (Just want to see if there is a better way to solve your problem...) Josh
participants (3)
-
Josh Trutwin
-
Pagan
-
zentara