Re: [sqlite] How to set access permissions to protect a database file?

2019-05-26 Thread Adrian Ho
On 27/5/19 4:51 AM, James K. Lowden wrote: > On Sun, 26 May 2019 19:52:29 +0800 > Adrian Ho wrote: > >> Finally, create a "reading_room" script that your users will run: >> >> #!/usr/bin/env bash >> >> sudo -u reading_room /path/to/reading_room.tcl > This script is more efficient and portable: > >

Re: [sqlite] How to set access permissions to protect a database file?

2019-05-26 Thread Adrian Ho
On 26/5/19 9:10 PM, Graham Holden wrote: > You should probably also make sure that users cannot alter the tcl > file through which they access the database file; probably something > like: > > chown reading_room /path/to/reading_room.tcl > chmod 644 /path/to/reading_room.tcl Good point. In fact,

Re: [sqlite] How to set access permissions to protect a database file?

2019-05-26 Thread Adrian Ho
On 27/5/19 12:43 AM, Luuk wrote: > > On 26-5-2019 13:52, Adrian Ho wrote: >> On 26/5/19 7:49 AM, Markos wrote: >>> I made a program (reading_room.tcl), with Sqlite running on Debian 9, >>> to control the books of a reading room. >>> >>> I implemented an authentication system for common users and >>

Re: [sqlite] round function inconsistent

2019-05-26 Thread James K. Lowden
On Fri, 24 May 2019 13:10:49 + Jose Isaias Cabrera wrote: > >Consider these two queries: > > > > SELECT round(3.255,2); > > SELECT round(3.2548,2); > > > >Do you expect them to give different answers? > > 3.26 > 3.25 sqlite> SELECT cast(100 * (0.005 + 3.2548) as

Re: [sqlite] How to set access permissions to protect a database file?

2019-05-26 Thread James K. Lowden
On Sun, 26 May 2019 19:52:29 +0800 Adrian Ho wrote: > Finally, create a "reading_room" script that your users will run: > > #!/usr/bin/env bash > > sudo -u reading_room /path/to/reading_room.tcl This script is more efficient and portable: #! /bin/sh sudo -u reading_room /path/to/reading_room.

Re: [sqlite] How to set access permissions to protect a database file?

2019-05-26 Thread Luuk
On 26-5-2019 13:52, Adrian Ho wrote: On 26/5/19 7:49 AM, Markos wrote: I made a program (reading_room.tcl), with Sqlite running on Debian 9, to control the books of a reading room. I implemented an authentication system for common users and administrator users in the reading_room.tcl program.

Re: [sqlite] SEE extension questions

2019-05-26 Thread Richard Hipp
On 5/26/19, Karl Sanders wrote: > Hi, > I'd like to ask a few questions about the SEE extension. > > - Are tables (virtual and real) used by the various extensions (in > particular by the FTS5 and R*Tree modules) encrypted? Yes > > - Are there any pragmas or compile-time options that don't work

Re: [sqlite] SEE extension questions

2019-05-26 Thread Simon Slavin
On 26 May 2019, at 2:27pm, Karl Sanders wrote: > I'd like to ask a few questions about the SEE extension. > > - Are tables (virtual and real) used by the various extensions (in > particular by the FTS5 and R*Tree modules) encrypted? The entire database file is encrypted, block by block, includi

[sqlite] SEE extension questions

2019-05-26 Thread Karl Sanders
Hi, I'd like to ask a few questions about the SEE extension. - Are tables (virtual and real) used by the various extensions (in particular by the FTS5 and R*Tree modules) encrypted? - Are there any pragmas or compile-time options that don't work with encryption? - Is there any functionality that

Re: [sqlite] How to set access permissions to protect a database file?

2019-05-26 Thread Graham Holden
You should probably also make sure that users cannot alter the tcl file through which they access the database file; probably something like: chown reading_room /path/to/reading_room.tcl chmod 644 /path/to/reading_room.tcl (It's possible that you will also need execute permission on the file, in

Re: [sqlite] How to set access permissions to protect a database file?

2019-05-26 Thread Adrian Ho
On 26/5/19 5:26 PM, Luuk wrote: > > On 26-5-2019 01:49, Markos wrote: >> Now I want that any user logged in the Linux be able to run the >> program reading_room.tcl, which will access the database (books.db) >> >> But I want to protect the file books.db so that only the the program >> reading_room

Re: [sqlite] How to set access permissions to protect a database file?

2019-05-26 Thread Adrian Ho
On 26/5/19 7:49 AM, Markos wrote: > I made a program (reading_room.tcl), with Sqlite running on Debian 9, > to control the books of a reading room. > > I implemented an authentication system for common users and > administrator users in the reading_room.tcl program. > > Now I want that any user log

Re: [sqlite] How to set access permissions to protect a database file?

2019-05-26 Thread Luuk
On 26-5-2019 01:49, Markos wrote: Hi, I made a program (reading_room.tcl), with Sqlite running on Debian 9, to control the books of a reading room. I implemented an authentication system for common users and administrator users in the reading_room.tcl program. Now I want that any user log