The password database should open just fine.
KeePassXC reports as follows:
Unable to open the database.
Permission denied
Copy the database to a writeable file system, open it there, and shred it once you're done.
KeePassXC 2.2.2
Operating system:
$ lsb_release --all # linux version distro
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
CPU architecture:
$ lscpu | head -n1
Architecture: x86_64
Kernel:
$ uname --kernel-name --kernel-release --kernel-version
Linux 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017
Enabled extensions: None
It's possibly lock file creation that fails.
Shredding the database shouldn't be needed if you use a sufficiently strong master key and an appropriate number of transformation rounds.
We really need to get rid of the lock file
I'm not able to duplicate this bug. When I open a database file from a USB drive mounted read-only, it opens the database in read only mode (seen in the window title bar) and the save button acts like a "Save As" button. My versions of os, kernel and source are identical to yours.
I scanned through the database open and the lock file creation code and all of the correct fall back to read only bits seem to be in place. That error message specifically comes from the QFile.open function call (gui/DatabaseTabWidget.cpp:150). QT is returning the "Permission Denied" portion of the message.
What file system and mount options are you using for the USB drive?
Mount info:
type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
Was this fixed by #1231?
Yes, thank you! Apropos, the message saying that the file was opened read-only disappeared after about 300 ms without any user intervention.
Most helpful comment
We really need to get rid of the lock file