run CGI apps as root

run CGI apps as root

Post by Ken Willia » Sun, 13 Dec 1998 04:00:00



Does anyone know how I can get som CGI apps to run as root?  They are called
by nobody, but I need them to run as root under Apache.  Will suexec all this?

Thanks

 
 
 

run CGI apps as root

Post by Joshua Sliv » Mon, 14 Dec 1998 04:00:00



> Does anyone know how I can get som CGI apps to run as root?  They are called
> by nobody, but I need them to run as root under Apache.  Will suexec all this?

Ouch... Sounds like a very bad idea.  If there are any problems with
your CGI, you can terribly compromise the server.  I would guess that
if you outlined why you think you need to do this, someone in this
group could come up with a better way that wouldn't involve running as
root.

If I remember correctly, suexec specifically prevents you from running
as root, although I suppose you could hack the code to get around
this.  Again, this would be a very bad idea if you care at all about
the security of the server.

--
Joshua Slive

http://finance.commerce.ubc.ca/~slive/

 
 
 

run CGI apps as root

Post by Thad Humphri » Tue, 15 Dec 1998 04:00:00




> Does anyone know how I can get som CGI apps to run as root?  They are called
> by nobody, but I need them to run as root under Apache.  Will suexec all this?

If you absolutely have to, do *not* do this system wide but on a per CGI
basis. But if you have a well tested CGI, try setting the CGI's owner root
and setuid in the permissions.

--------------------------------------------------------------------
Thad Humphries                  "'Open Systems' means no fences. And
Software Engineer (aka, Nerd)    no fences means no use for Gates."
Phone: 540/675-3015, ext. 225                     - Sun Microsystems