Running python cgi scripts that require external cvs under apache

Noah noah at noah.org
Fri May 6 16:50:20 EDT 2005


How do you run the cvs binary from your script? If this is a simple CGI
that calls os.popen() or os.system() then the cvs binary is most likely
running as the same user as the Apache HTTP server (usually someone
like "nobody", "apache", or "www").  http://cgiwrap.unixtools.org/ is
one solution.  Also consider suEXEC  which is part of the Apache
distribution; although, it is not installed by default. See
http://httpd.apache.org/docs/suexec.html . There are reasons why this
is dangerous and those reasons are discussed in the suEXEC
documentation. You can also see if the system administrator can allow
the web server user or group to run cvs. Again, this exposes your
server and so it's dangerous, but allowing cvs commit from a CGI is
dangerous, so I assume you know what you are doing. All of these
solutions will require the involvement of your UNIX system
administrator.

You may also want to look at the ViewCVS project
(http://viewcvs.sourceforge.net/ ) since that is written in Python and
implements a CGI-to-cvs interface. This may give you some
implementation hints.

Yours,
Noah




More information about the Python-list mailing list