When using PDO sqlite PHP adapter, new sqlite database file is created with group permission set to read-only, and does not honor umask.
I need every database file to be writable by group. Any way to accomplish it?
Edit: I know how to change permissions of a file, I'm asking whether it is possible to create it with correct permissions (according to process umask) or not.
It looks like there's a SQLITE_DEFAULT_FILE_PERMISSIONS compilation parameter.
It seems umask is applied on top of it to restrict it, if necessary.
So it makes sense to recompile with SQLITE_DEFAULT_FILE_PERMISSIONS=666 and than rely on umask. Too bad it's not a default option in sqlite.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With