sqlite3 permission issue

chris chris.stromberger at gmail.com
Tue Mar 4 16:46:16 EST 2008


On Mar 4, 3:10 pm, chris <chris.stromber... at gmail.com> wrote:
> I am trying to execute an update to a sqlite3 db via a python cgi
> script.  I can execute a select via a cgi script, but when I attempt
> an update, I get an "unable to open database file" error.  But the
> error comes on the update statement, not on the connect.
>
> So the script has:
>
> conn = sqlite3.connect('db')
> c = conn.cursor()
> --we get here ok--
> c.execute("insert into contact ...") <-- this statement produces the
> error
>
> I can run the exact same python code from the command line and it
> works, so it has something to do with the user that runs the cgi
> (apache I assume).  I chmodded the db file to 666, but it did not
> help.
>
> Any ideas?
>
> Thanks,
> Chris

Nevermind, it was the directory permissions causing the issue.  Works
now.



More information about the Python-list mailing list