Apache cant write to database.

Submitted 3 years, 8 months ago
Ticket #101
Views 256
Language/Framework Python
Priority High
Status Closed

I have not succesfully been able to have mit django website running via Apache. The problem is now that i get this error message:

-------------------------------------------------------------

OperationalError at /admin/login/

attempt to write a readonly database

-------------------------------------------------------------

I get this error when i am trying to login to the admin panel.

I have made sure that apache is able to read, write and execute to my database, and anyother folder within my project.

Here are all the permissions given:

-------------------------------------------------------------

drwxrwxrwx 6 lasse www-data   4096 Aug  7 21:43 base
-rwxrwxrwx 1 lasse www-data 131072 Aug  7 21:59 db.sqlite3
drwxrwxrwx 6 lasse www-data   4096 Aug  7 21:12 env
drwxrwxrwx 3 lasse www-data   4096 Aug  7 22:01 lassejonassen
-rwxrwxrwx 1 lasse www-data    669 Aug  7 21:12 manage.py
-rwxrwxrwx 1 lasse www-data     57 Aug  7 21:12 requirements.txt
drwxrwxrwx 4 lasse www-data   4096 Aug  7 21:12 static

-------------------------------------------------------------

What can i do to solve the problem?

Submitted on Aug 08, 20
add a comment

1 Answer

*Now instead of not.

Submitted 3 years, 8 months ago

is the apache server running as same as owner of the db.sqlite3 file?. If not try providing permission to django database file to 755 this is not recommended solution but we can use for debugging.
or change the owner of the database file should be equivalent to apache server running.

- scott 3 years, 8 months ago

If issue has been resolved then can you close the ticket?

- Vengat 3 years, 8 months ago


Latest Blogs