[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] CGI as root



On Wed, 28 Jun 2000, Christian Hekerens wrote:
> i tried to change a config file with a cgi program. so i have ti chown to
> root. after that the execution of the cgi-script was denied.
> 
> how can i run a cgi-script as root user? or how can i change a config (owner
> root and it should not be readable by anyone else) file with an cgi-scipt?

This is REALLY dangerous...if someone hacks the cgi they have access to
the entire machine, cgi wrapper will not allow this under any conditions
directly....if you must do it, disable the wrapper, or , better, exec a
seperate
program from the cgi that has the appropriate sticky bits....
 (this at least gives you a little seperation from the original cgi if it
gets hacked up) , make SURE you don't leave this thing writable by users..

for effect...i repeat...this is a dangerous thing to do....
g.