writing captcha image file

Fredrik Lundh fredrik at pythonware.com
Tue Apr 11 03:39:35 EDT 2006


amaltasb at gmail.com wrote:

> I get this msg:
> Traceback (most recent call last):
>   File "/usr/local/apache/cgi-bin/newuser.cgi", line 61, in ?
>     cstatus = im.save(file_name,'JPEG')
>   File "/usr/local/lib/python2.4/PIL/Image.py", line 1299, in save
>     fp = __builtin__.open(fp, "wb")
> IOError: [Errno 13] Permission denied:
> '/usr/local/apache/htdocs/captcha/t13uum15a2jgfj2sqg.jpg'

that means exactly what it says: the user account that your CGI script
is running under is not allowed to write to that directory.

this is a Unix/Apache configuration issue, not really a Python issue.  see
this apache FAQ entry for some additional info:

http://httpd.apache.org/docs/2.2/faq/error.html#error.permissiondenied

</F>






More information about the Python-list mailing list