[nycphp-talk] Re: Safely running root commands
Faber Fedor
faber at linuxnj.com
Sun Feb 27 23:21:13 EST 2005
On 27/02/05 21:59 -0600, csnyder wrote:
> I don't like any of those options.
Neither do I, which is why I asked. :-)
> Are you sure it isn't possible to set this up in such a way that either:
>
> 1) cron can run the necessary commands as root, and you scripts just
> pick up the data from a neutral location
No can do. See my email to Hans.
> or
>
> 2) you write a daemon using PHP that runs as root, and listens to a
> some port or file for a "go" command, runs the commands, and then
> returns the results
Hmmmm, a daemon. There's an idea I like. But why would I write a daemon
in PHP? Sure, I *could* do a daemon in PHP, but I _could_ do it in bash
as well. Perl or even Python would seem a better language, IMO.
> Either of those seems preferable to giving the webserver any kind of
> escalated privileges.
I agree. Now, to figure out how to do it...
--
Regards,
Faber
Linux New Jersey: Open Source Solutions for New Jersey
http://www.linuxnj.com
More information about the talk
mailing list