I have Ubuntu VM with Apache Server on which i am running my application. I have inserted some login and registration file using Filezilla.
But my registration, Login and admin page is not working. It is giving me
Exception Type: OperationalError
Exception Value: attempt to write a readonly database
I tried the following after doing some Stackoveflow. chown root db.sqlite3
. Unfortunately, I still get the same error when trying to access above page. Any help would be greatly appreciated. Probably something to do with changing user permission which i have no idea where to start in diagnosing what permission issue is going on.
Edit:
After giving the ownership to Apache User I am able to fix this issue. sudo chown -R www-data:www-data /var/www
Looks like your database
is set to read-only permission. You have to give write permission to your sqlite3 db
. you can use the chmod
command for changing the file permission
sudo chmod 666 db.sqlite3
( For read and write permission to every user).
6 indicates read and write permission(4+2)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.