[SOLVED / FIXED] Django attempt to write a readonly database OpenLiteSpeed & CyberPanel
ERROR : Django attempt to write a readonly database server using OpenLiteSpeed & CyberPanel.
[SOLUTION / FIX] :
Locate the db.sqlite3 file location, it should be normally in Django Project directory. For example if Django is installed in Souq Project in public_html directory:
E.g.
/home/souqagora.tk/public_html/souq/db.sqlite3
Using SSH execute following command:
chown nobody:nobody /home/souqagora.tk/public_html/souq/db.sqlite3
and for the directory as well:
chown nobody:nobody /home/souqagora.tk/public_html/souq/
Important!!!
Sometimes above doesn't work, so you have to use username instead of nobody as below:
chown {username}:nobody /home/souqagora.tk/public_html/souq/db.sqlite3
chown {username}:nobody /home/souqagora.tk/public_html/souq/
Hope this error would be resolved after that.
If necessary one may set permission 777 on db file as well:
chmod -R 777 db.sqlite3
Please let us know in the comments if above solved / fixed your issue as well.