I have a linux application with daemons running under several uids.
I wish them all to be able to access and modify an SQLite database.
I am using the Perl DBI SQLite interface on a debian system.
However, regardless of how permissively I set the umask in my code,
the sqlite code will not create a file with permissions more lax
than rw-r--r--.

I see in the SQLite source:

> #ifndef SQLITE_DEFAULT_FILE_PERMISSIONS
> # define SQLITE_DEFAULT_FILE_PERMISSIONS 0644
> #endif

and associated code, which I guess is causing my problem.


I found a single mailing list post from 23 Feb 2007:

> Re: [sqlite] about default file permission of SQLite database file
> John Stanton
> Fri, 23 Feb 2007 07:33:01 -0800
> It would be better to make the create permission 0666. Then umask
> can restrict that permission and the user can get whatever permission
> required by the application.

but clearly this change has never been made.


Please would someone in the know explain to me why the SQLite
designers believe that SQLite should override umask settings.

Such an override is rather unexpected. Clearly, I could recompile
my own version of the sqlite packages, but this is extra work so
it would be helpful to know why this design decision was taken.


-jonathan

-- 
 Jonathan H N Chin   | deputy computer | Newton Institute, Cambridge, UK
<jc...@newton.ac.uk> | systems manager | tel/fax: +44 1223 767091/330508
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to