How Can I Prevent Others From Opening My Database

I have a quite simple database which I constructed a long time ago, and now have little recollection of how I did it! The data is stored in a table called ‘Table 1’ which looks like a spreadsheet but seems to have no separate existence on my PC - at least, I can’t find it. This has never been an issue because I don’t need to have direct access to the table, I make changes through the LO Base front end.

I am content with the way the system works for me, but would like to prevent anyone else who gets access to my PC from opening the database to see the contents. I am not concerned over complexities such as granting read-only permissions, just stopping anyone else from opening the database at all. It seemed to me that password protection was the obvious answer, but from what I have been reading that seems to be possible in Libre Office only for *.odt or *.ods documents. Is there a way I can ensure that I am the only one who can open the database? If the solution means that I need to control access to Table 1, how do I do that, given that it seems to have no independent existence?

Using LO Version: (x64) under Windows 10.


Deleted my answer as some further testing is required.

A database can exist as an “embedded base”, typically for single user (no multiple concurrent access) and either for small systems or for prototyping/testing. For large scale use (storage, performance or multiuser requirements) the database will normally not be embedded in the Base file, but an entity within a database service. You can install such a service locally on your workstation or on a separate computer.

Either way, your database exists somewhere as a separate entity. At least there is a Base (.odb) file which constitutes the connection between the data and the software.

In the case of “embedded database”, the actual data are also stored in that file and served to other apps by a “stripped down” embedded database server module within LibreOffice. As far as I know, the embedded database module does not support any form of password protection. There are good reasons for this, connected to development resources and performance. If this is your situation (most likely scenario) your best bet would be to make a restricted folder. You then need to locate your odb file and move it to that folder. How to do this depends on your system, and I am not sure that it will work with a registered data source. If you want to look into this, I can provide an outline for setting it up in your Win10 system.

A database server software will support authentication, so you can define user access rights on the server side. The .odb file will then only serve as the link between LibreOffice and the database server. If you are working with real, important data, by all means consider a full database service setup.

See also Create password for Base database


Yes, forgotten post. Have re-tested and there is no solution for HSQLDB embdded.

Outline for database in protected folder in Windows 10

Assuming that you are using an embedded DB.

Note that this requires that the folder is on an NTFS volume, and that you have some business edition of Windows. It will not work on “home”, but OK on “pro”/“enterprise”. Not sure about other editions.

Locate your database

  • Press ctrl+shift+F4 for the data sources pane.
  • Right click on one of the databases and select the bottom entry, Registered data sources ....
  • Select your database in the list, and click the Edit... button.
  • The first field shows the full path to your database file.

Protected folder

  • Open “Documents” folder in your file manager
  • Press ctrl+shift+N to create a new folder.
  • Copy your .odb file into the new folder.
  • See this link for the encryption procedure.
  • Back in the edit window for registered DB, browse to the copied DB.
  • If you can make your copy work, delete the original DB.