SQLite Forum

Is write permission required for read-only connections on a WAL database?
Login
> You might be able to get a result by having another connection create the -shm and -wal files first, then establishing your read-only connection. But that's a hack and I don't know if it will really work.

Thank you, we're getting closer to an answer to my question.

According to your answer, a reader *needs* write access to the database, even if it opens a read-only connection, so that it can create the -shm and -wal files.

What I still don't know is: if a read-only connection is opened *after* -shm and -wal files are created, can it prevent checkpointing if the reader process has no write permission?

I can't find anywhere in the documentation if the WAL journal mode requires the write UNIX permissions or not, even for `SQLITE_OPEN_READONLY` connecttions.