Newbie CGI question

Paul Boddie paulb at infercor.no
Tue Nov 14 04:43:23 EST 2000


David Lees wrote:
> 
> I am trying to make my first CGI script work and am having a permissions
> problem on an apache server, RedHat 6.2.  I made sure the form.py test
> script copied from Programming With Python, by Altom (pages 181-182) has
> execution permission.  When I fill in the form under test and execute
> the Python code in the cgi-bin, I have permission errors when I try
> writing a file.  What is the standard way to handle this?  I thought
> that for security reasons the cgi-bin directory is root.   Is there a
> standard scratch area used for opens?

I would think that your program would have to specify a file residing in a
directory which permits writing by the user who is running the Web server
process. Many Web servers seem to run as "nobody" when they start up, although
this can be changed, so you might want to make sure that "nobody" can access the
file or directory in question. Of course, the quick and insecure way of testing
the program is to specify a file in /tmp...

Regards,

Paul



More information about the Python-list mailing list