Laravel + SQLite = SQLSTATE[HY000]General Error: 8 attempt to write a readonly database Laravel + SQLite = SQLSTATE[HY000]General Error: 8 attempt to write a readonly database sqlite sqlite

Laravel + SQLite = SQLSTATE[HY000]General Error: 8 attempt to write a readonly database


You need to run two commands

First, change ownership of the Laravel directory to web group:

sudo chown -R :www-data /var/www/yourLarvelFolder

Second, give privileges over storage directory so it can be writable:

sudo chmod -R 775 /var/www/yourLarvelFolder/storage


give permission here in ubuntu working on 18.04 and laravel 6

sudo chmod -R 775 databasesudo chown -R $(whoami) database


If you are on Fedora or Redhat with Selinux rememebr to switch off Selinux (or configure it correctly):

setenforce 0