Perm issues in sqlite databases show up in slightly different ways
SQLite databases may return SEC_ERROR_READ_ONLY instead of
If a database is opened as read-write but it fails (e.g. in a
read-only directory) it will try again to open it as read-only
and potentially fail because it doesn't exist at all. This sets
errno as ENOENT rather than the expected EACCES so treat that
as a read failure as well.