I have deployed my Django application in the CENTOS 7, it up and running , all select operation from data base is working fine and now i am unable to login to admin page and also unable to perform any write operations on the Data base , i am using defaut db.sqlite3 as a my data base,
Please i have SELinux is enabled, which we need for other security policies, please help, i have followed all other Stack-overflow answers given chown apache:apache permissions to project directory also for db.sqlite3,
Also i have used enabled http_unified as 1 also, but not working
PFB below errors
attempt to write a readonly database
Request Method: POST
Request URL: http://192.168.225.45/
Django Version: 3.1
Exception Type: OperationalError
Exception Value:
attempt to write a readonly database
Exception Location: /home/www/project/venv/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py, line 413, in execute
Python Executable: /usr/local/bin/python3
Python Version: 3.6.9
ignored_wrapper_args
(False,
{'connection': <django.db.backends.sqlite3.base.DatabaseWrapper object at 0x7fd9f6760278>,
'cursor': <django.db.backends.utils.CursorDebugWrapper object at 0x7fd9f7f69e48>})
params
['Sunag', 12331, 'M']
self
<django.db.backends.utils.CursorDebugWrapper object at 0x7fd9f7f69e48>
sql
('INSERT INTO "testapp_candidatemodel" ("name", "rollno", "shirt_size") VALUES '
'(%s, %s, %s)')
2
Answers
you need to do this:
it should work.
Has more to do with making IIS AppPoolDefaultAppPool as a user in IIS to give it full control that the SQL Database is sitting in….. seemed to work for me.