'python flask sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) attempt to write a readonly database
i am trying now about two hours to fix this problem. I know there are already alot of topics about this, but none of them is helping me.
I am using python and flask to run my apache2 server.
in this folder is my .wsgi file and my database. /var/www/html/webApp
i gave the whole folder and the data base rights with:
chmod 777 /var/www/html/webApp
chmod 777 /var/www/html/webApp/users.sqlite3
i restarted after these comments the vps and the apache2 server multiple times, but still i am geting this error.
I really hope someone can help me.
regards
Solution 1:[1]
I am working on the same issue, could resolve it with help from the following page: sqlite3.OperationalError
//do the follow
chown www-data /myproject
chown www-data /myproject/db.sqlite3
chmod 777 /myproject/db.sqlite3
The folder containing the db-file and the db-file itself must be owned by www-data. Otherwise the flask-application has no rights to change the db-file.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | caldetas |
