Wednesday, December 30, 2020

Re: attempt to write a readonly database

It's a permissions error on the file.  For those running Linux change to the directory and type  ls -l *.sqllite so we can see who the owner and group are on the file. If you are running nginx it should be the same user as nginx is configured to run as (www-data) by default.  If the owner (or group) are www-data then look at the permissions, does that user/group have read and write on the file.

If you are on windows it's the same issue either the owner or the file permissions are wrong

On Wednesday, 30 December 2020 at 16:14:10 UTC jayo...@gmail.com wrote:
I got the same error when I deployed my Django web app over Nginx server and tried to access Django admin. If anyone knows the solution please revert back.
regards,
govind



On Wed, 30 Dec 2020 at 20:45, RANGA BHARATH JINKA <bharath...@gmail.com> wrote:
hi,

Try running as the root user using sudo permissions.

All the best

On Wed, Dec 30, 2020 at 8:18 PM Steven Mapes <st...@jigsawtech.co.uk> wrote:
This normally means that the user you are running your project as does not have access to the SQLLite database file. I can see that you are running on windows so fine the database in the file system and check and change the owner as well as ensuring that the owner/group has read/write access to the file.

On Thursday, 24 December 2020 at 07:23:24 UTC parul....@gmail.com wrote:
Can anyone help with this?


OperationalError at /users/

Request Method:POST
Request URL:http://localhost:8000/users/
Django Version:3.0.3
Exception Type:OperationalError
Exception Value:
attempt to write a readonly database
Exception Location:C:\Users\parul\anaconda\envs\MyDjangoEnv\lib\site-packages\django\db\backends\sqlite3\base.py in execute, line 396
Python Executable:C:\Users\parul\anaconda\envs\MyDjangoEnv\python.exe
Python Version:3.8.5
Python Path:
['C:\\Users\\parul\\Desktop\\Djangoforms\\ProTwo',   'C:\\Users\\parul\\anaconda\\envs\\MyDjangoEnv\\python38.zip',   'C:\\Users\\parul\\anaconda\\envs\\MyDjangoEnv\\DLLs',   'C:\\Users\\parul\\anaconda\\envs\\MyDjangoEnv\\lib',   'C:\\Users\\parul\\anaconda\\envs\\MyDjangoEnv',   'C:\\Users\\parul\\anaconda\\envs\\MyDjangoEnv\\lib\\site-packages']
Server time:Wed, 23 Dec 2020 16:14:46 +0000




--------->>> Also, i checked the properties in db.sqlite3, all the permissions are checked...write permission also
can anyone help 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e5d80366-037b-4ebc-a4ac-9bc1e32bf5ben%40googlegroups.com.


--
Thanks and Regards

J. Ranga Bharath
cell: 9110334114

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a1467545-f551-4760-ac2c-d28671dc30b9n%40googlegroups.com.

No comments:

Post a Comment