beginners Q: CGI and file paths

Gordon McMillan gmcm at hypernet.com
Thu May 27 10:38:28 EDT 1999


Mr J Littler writes:

> I've written a cgi script that outputs a couple of files.
> The default placement is in the cgi-bin directory and
> I want them to go elsewhere. I've tried ...
> 
> filename = "/proper_path_here/c_list.html"
> append = open(filename, 'a')
> 
> but putting the path in front of the filename makes no
> difference (and doesn't generate an error)
> I read thro cgi.py but can't see what to do.

Have you checked file / directory permissions? cgis normally run as 
"nobody".

- Gordon




More information about the Python-list mailing list