Django error when opening SQLite3 db file when starting Apache

I got this error:

OperationalError with /

unable to open database file

Things I've tried so far set the absolute path of my dev.db file in settings.py file. I tried to add www data to my admin group and set the group of my project folder to the administrator and set the group to www-data, none of which solved the problem.

I am completely stuck here if anyone has a solution, that would be very helpful!

Sean

+6
python django ubuntu sqlite3
source share
1 answer

Just the last 30 minutes hit my head on this issue.

Decision

In your settings.py file:

DATABASE_NAME = '/absolute/path/to/your/database.db' 

Setting permissions:

 chown www-data /absolute/path/to/your/ chown www-data /absolute/path/to/your/database.db 
+8
source share

All Articles