Search code examples
phplaravelsqlitevagranthomestead

SQLSTATE[HY000]: General error: 14 unable to open database file - Laravel


Running a Laravel Homestead Vagrant box which is using PHP 5.6. The database is an sqlite file. I am getting this error:

SQLSTATE[HY000]: General error: 14 unable to open database file

This occurs when attempting to insert login data in the database.

Both the database file and the containing folder are set to 777 permissions so I don't think this is a permissions issue, I have tried removing the containing folder and recreating the database to no avail.


Solution

  • The solution to this was to change the permissions on the host machine and not inside the Vagrantbox terminal.