Unable to access sqlite3 database, logging in to django admin gives 'attempt to write to read only database' error

Keywords: Django - AWS - Technical issue - Permissions
bnsupport ID: c6a035eb-0d4f-61af-ce51-c33c22ecb57c
I’ve seen this question posted on here where they have said that the problem is that the instance does not have permission to use the file. Well I changed the ownership on my db.sqlite3 file to daemon for both user and group and it still doesn’t work.

What should my next steps be to fix this?

Hi @essgeestep,

I just followed our documentation and deployed a sample project inside the /opt/bitnami/projects/PROJECT folder.

bitnami@bitnami-django-fde0:/opt/bitnami/projects/PROJECT$ ls -la
total 148
drwxr-xr-x 4 bitnami root      4096 Jul  5 12:05 .
drwxr-xr-x 3 bitnami root      4096 Jul  5 12:02 ..
-rw-r--r-- 1 bitnami bitnami 131072 Jul  5 12:05 db.sqlite3
drwxr-xr-x 3 bitnami bitnami   4096 Jul  5 12:03 helloworld
-rwxr-xr-x 1 bitnami bitnami    663 Jul  5 12:02 manage.py
drwxr-xr-x 3 bitnami bitnami   4096 Jul  5 12:07 PROJECT

In order to configure the database, I used the default configuration

    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'db.sqlite3',

Note: I’ll notify our documentation team to update this info in the documentation

Then, I ran the migration, startapp and runserver commands as explained there


and I could access the site without problems

I also created a superuser user and accessed the admin panel

python manage.py createsuperuser --username=user --email=user@example.com

Could you please follow this instructions and confirm if they work for you too?


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.