I am lost, i have tried everything about this issue and can't find solution. I have the app on django 1.8 / python 3.3.5 / centos 7 / apache. It is default sqlite db here. Everytihng is working fine with django's webserver but fails with error "attempt to write a readonly database" on Apache. I have done all checks according to this doc https://code.djangoproject.com/wiki/NewbieMistakes#DjangosaysUnabletoOpenDatabaseFilewhenusingSQLite3 db file and it's root folder have write permissions and "apache apache" user owner but it is still the same error:
OperationalError at /logout/
attempt to write a readonly database
Request Method: GET
Request URL: http://app.server.corp/logout/
Django Version: 1.8
Exception Type: OperationalError
Exception Value:
attempt to write a readonly database
Exception Location: /usr/local/lib/python3.3/site- packages/django/db/backends/sqlite3/base.py in execute, line 318
Python Executable: /usr/local/bin/python3.3/
Its because there was “attempt to write a readonly database” so for me helped following in shell:
chmod 755 db.sqlite3
So we are just changing a permissions to DB file. In other words Server cannot write to file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With