[pybsddb] DBAccessError: (13, 'Permission denied') using mod_python

denis.papathanasiou at gmail.com denis.papathanasiou at gmail.com
Fri Jan 23 00:59:14 CET 2009


I've written a python module to access a database file using bsddb3; the
module works fine when called from command line or within a python shell.

But when I load and run the module in mod_python under apache, I get
this error:

>   File "/opt/tools/berkeley-db/db.py", line 22, in with_db
>     dbe.open(environment_folder, db.DB_CREATE | db.DB_INIT_MPOOL | db.DB_INIT_LOCK)
> 
> DBAccessError: (13, 'Permission denied')

I checked the permissions on the folder corresponding to
environment_folder, as well as all the database files in that folder,
and confirmed that the user running apache has the appropriate
permissions to access that folder and the files in it.

I also searched the mailing list for this error and saw the note about
using DB_THREAD, so I changed line 22 to:

> dbe.open(environment_folder, db.DB_CREATE | db.DB_INIT_MPOOL | db.DB_INIT_LOCK | db.DB_THREAD)

but got the same result.

Any ideas what to look at or try now?



More information about the pybsddb mailing list