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 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.tcl can access the books.db file (to read or write). But that no user could delete or write to the file books.db (only the program reading_room.tcl)

Please, how can I configure the system to do that?

How to define the permissions?

Thanks,

Markos

If you have read, and used, this: https://www.sqlite.org/src/doc/trunk/ext/userauth/user-auth.txt than you should know the answer ;)

Otherwise set access permissions on the database  (use: 'man chmod' and/or 'man chown', to find out how to do that under Debian 9)

If a user has no right to modify the db, and tries to do an update, an error is returned from sqlite:

sqlite> insert into User values(42);
Error: attempt to write a readonly database



_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to