Thread: Apache
View Single Post
Old 25th February 2010
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

Well, I would write a simple server which opens a socket, run that as root, and then connect to it with your PHP app.
This way you can keep your server chrooted, and also solved all the complexity problems with sudo and whatnot.

I once wrote something similar with Python, I would post it as an example/guide but I can't seem to find it right now But this is a fairly common method of doing this sort of stuff so you should be able to find plenty of documentation/examples.

I haven't used sudo in years, so I have little help to offer with that.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote