If you just need to read/write to the database file just change its permissions. And the owner too
Fist, try with the owner
Fist, try with the owner
sudo chown user_name:user_name /path/database_file_nameAnd then try the program. If doesn't work change the permissions
sudo chmod 660 /path/database_file_name