Results 1 to 2 of 2
Hi, when I run a command inside a php script e.g exec("ps awx") it is executed as root, how can I make that command run as normal user that already ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-25-2013 #1Just Joined!
- Join Date
- Feb 2013
- Posts
- 33
permissions
Hi, when I run a command inside a php script e.g exec("ps awx") it is executed as root, how can I make that command run as normal user that already exists ?
thanks
- 02-26-2013 #2Just Joined!
- Join Date
- Sep 2012
- Location
- Nashville, TN
- Posts
- 67
Can you supply some of the code that you are executing? I went through the documentation and it appears that the exec command will execute as the owner of the http process. which on CentOS is normally apache or www-data (can't remember). What happens if you create a test script and run the whoami or id command and display the results on screen?


Reply With Quote
