Page 1 of 1

How to cause Apache to su to another user

Posted: Tue Dec 05, 2006 12:52 pm
by memotype
I asked this question on the PHP Code forum, and was told to hask in the linux forum:

viewtopic.php?p=336085

Posted: Tue Dec 05, 2006 2:19 pm
by feyd
I believe he was referring to the ubuntu forum that was linked to during the course of the thread, not here.

Posted: Thu Dec 07, 2006 6:34 am
by memotype
feyd wrote:I believe he was referring to the ubuntu forum that was linked to during the course of the thread, not here.
Why would I ask the ubuntu forum?? I'm not running ubuntu...

Posted: Thu Dec 07, 2006 7:38 am
by Chris Corbyn
memotype wrote:
feyd wrote:I believe he was referring to the ubuntu forum that was linked to during the course of the thread, not here.
Why would I ask the ubuntu forum?? I'm not running ubuntu...
Any linux forum. If you want to try this with PHP then exec() etc will be no use since su needs to read from stdin. Try using proc_open() to get a handle on the running process and then pipe into stdin from there.

What do you need this for again?

Posted: Thu Dec 07, 2006 7:39 am
by Chris Corbyn
You'll also need the apache user in the wheel or sudoers group for that to stand a chance of working.