3 ms·
Why do you need read only WAL mode? Or do you just mean some processes are read only, while others can write?
by tmp538394722 6y ago
Why do you need read only WAL mode? Or do you just mean some processes are read only, while others can write?
- ZnZirconium 6y agoThe real reason I need WAL mode is so I can read the database while vacuum is running. The web server runs unprivileged and only needs read permission. Insert and vacuum are done as a user which has write permission. The documentation says read only WAL mode is possible if there is write permission on the directory. So I put the database file in its own directory and set the mode of the database file to 0664 and set the mode of the directory to 3777. So an unprivileged process has permission to create WAL files which become group writable.
- tmp538394722 6y agoThank you for explaining.
- anitil 6y agoMy understanding is that this is because a temporary file needs to be created next to the db in WAL mode so write permissions are necessary on on directory. (https://www.sqlite.org/tempfiles.html https://www.sqlite.org/tempfiles.html, search for 'WAL')