You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Eric L. Brine" <EL...@iname.com> on 2000/04/08 01:39:21 UTC

Re: Silly Question

> I want to know if the script can be set with setuid as root for
> execution.

Since you asked this on this list, I will assume the script is a mod_perl
script.  Unless the whole web server runs as root, I don't think the
script can run as root.

Here's what you can do instead. Have the mod_perl script add the info
needed to a to-do list. Setup a root cron job to periodically check if
there is anything in the to-do list. If there is, process the entry. Of
course, that means the changes don't take effect immidiately.

Another alternative is to run the script as a .cgi instead of as a
mod_perl script. CGI scripts can run as root without running the server as
root.

ELB

--
Eric L. Brine  |  Chicken: The egg's way of making more eggs.
ELB@iname.com  |  Do you always hit the nail on the thumb?
ICQ# 4629314   |  An optimist thinks thorn bushes have roses.