PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
How to run web PHPscript in specified user, not in apache(default).
In linux you create user test, and he has rights like root.
Now you want to run http://www.yoursite.com/test.php, and script test.php is a execute script.
But by default scripts are treated like user apache,but apache hasent got enough rights to do test.php demand , and now i want that script will be executed by user test, which has the root rights.
Since Apache is invoking PHP to run the scripts, PHP *must* inherit the user rights of Apache. My guess is to increase the user rights for user Apache, although if you need *root* rights, you're probably looking in the wrong places.
which user and group it should run as is all in the .conf-file, however can be quite tricky as you aren't truly free.
a per directory-conf should not work I believe (would be rediculous having 100 apacheinstances running for the fact there are 100 folders all running using different users.