473,383 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Running python cgi scripts that require external cvs under apache

All:

I have written a Python webapp under MS IIS 5.0 that does the
following:
-Does a CVS checkout of a particular bit of xml
-Gets a list of valid cvs tags for that xml file
-Based on user input via forms, modifies that xml
-CVS checkin's that file

To have correct permissions to run the cvs binaries and to write
out the xml to be modified into a temp dir, I ended up having to
have the app run as a valid user account on this Windows box
that was hosting the app (it's just my workstation, with IIS
running). I.e., instead of IUSR_/IWAM_<compname>, it is running
as domain\someone. This "solution" worked well enough for me
to develop the cvs transactions, the html, etc.

However, it has been requested that I move this app onto one of
the IS Dept's servers. They insist that I put it on a solaris
box, which is running Apache. I have no administrative control
over this box, and I know very little about it, besides the fact
that test scripts (e.g., /cgi-bin/test.py ) work as expected.

However, I'm have a not-unexpected problem with permissions. When
folks use this page to modify the XML, it fails because:
1. the "effective-user-id" of the connecting person
has insufficient rights to run the cvs binaries
on the box
2. can't run cvs, so checkouts/rlogs/commits don't happen

I have heard of cgiwrap (http://cgiwrap.unixtools.com), and I'm
going to take a look at that. I was hoping that others have a
similar experience - with a happy ending - that they can share.

Any help is greatly appreciated.

-cjl

Jul 19 '05 #1
1 2004
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

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Frank Conte | last post by:
I'm having a problem running a simple printer friendly script written in PHP. I'm not sure whether the problem is with apache 1.3 or with the scripts. I updated apache's config file httpd.conf to...
0
by: quadric | last post by:
Hi, I have an application that has an embedded/extended Python interpreter. I need to add database capabilities and for reasons to lengthy to explain in this email, also require an embedded...
1
by: Rolfe | last post by:
Hi, I struggled, and got mod_python running on Apache/Win2k. Follow these instructions verbatim and you shouldn't have any trouble. These instructions are based on...
4
by: Peter Otten | last post by:
Is there a way to limit both width and height of a canvas text item? My current workaround seems clumsy: import Tkinter as tk root = tk.Tk() canvas = tk.Canvas(root, width=400, height=200,...
2
by: Mike | last post by:
We have a large c++ program that runs under Windows NT Embedded to control an instrument. That program has been written to run external python scripts. The computer where this code runs does not...
9
by: TPJ | last post by:
First I have to admit that my English isn't good enough. I'm still studying and sometimes I just can't express what I want to express. A few weeks ago I've written 'Python Builder' - a bash...
12
by: rurpy | last post by:
Is there an effcient way (more so than cgi) of using Python with Microsoft IIS? Something equivalent to Perl-ISAPI?
3
by: chernevik | last post by:
Here is a newbie question: how do I get the server examples in the Preview chapter of "Progamming Python" (Lutz) to run? The code is supposed to be a little webserver on which to run examples,...
1
by: walterbyrd | last post by:
I understand that Python has them, but PHP doesn't. I think that is because mod_php is built into apache, but mod_python is not usually in apache. If mod_python was built into apache, would...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.