How to cause Apache to su to another user

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
memotype
Forum Newbie
Posts: 5
Joined: Mon Dec 04, 2006 12:45 pm

How to cause Apache to su to another user

Post by memotype »

I asked this question on the PHP Code forum, and was told to hask in the linux forum:

viewtopic.php?p=336085
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I believe he was referring to the ubuntu forum that was linked to during the course of the thread, not here.
memotype
Forum Newbie
Posts: 5
Joined: Mon Dec 04, 2006 12:45 pm

Post 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...
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

You'll also need the apache user in the wheel or sudoers group for that to stand a chance of working.
Post Reply