This is for an unremarkable LAMP server running Ubuntu. The reason I want to do this is because I want a php script to be able to run a linux command via the exec() function and the command I want to run needs permission that 'nobody' does not have.I have added my new user 'web' with the appropriate permissions, now I just need my web server to be the user 'web'.
Tell me more
×
Server Fault is a question and answer site for
professional system and network administrators. It's 100% free, no registration required.
|
This is located in:
And is usually (by default):
You can change the user that apache runs as here. You'll need to restart apache for the changes to take. What you really want is SUEXEC. What you're proposing is rather quick and dirty; it also poses a huge security risk. What you should really be doing is this. |
|||
|
|
|
Have a look at suexec. Alternately you can set the user Apache runs as. This is an excerpt from my httpd.conf
|
|||
|
|