Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Permission denied" when trying to open read only password database #1187

Closed
victor-catalyst opened this issue Nov 16, 2017 · 6 comments
Closed

Comments

@victor-catalyst
Copy link

Steps to Reproduce (for bugs)

  1. Copy a password database to a USB stick
  2. Unmount the USB stick
  3. Remount the USB stick read-only
  4. Open the password database in KeePassXC

Expected Behavior

The password database should open just fine.

Current Behavior

KeePassXC reports as follows:

Unable to open the database.
Permission denied

Possible Solution

Copy the database to a writeable file system, open it there, and shred it once you're done.

Context

Debug Info

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

@phoerious
Copy link
Member

phoerious commented Nov 16, 2017

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.

@droidmonkey
Copy link
Member

We really need to get rid of the lock file

@philliprowland
Copy link

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?

@l0b0
Copy link

l0b0 commented Nov 22, 2017

Mount info:

type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)

@Algebro7
Copy link

Algebro7 commented Mar 7, 2018

Was this fixed by #1231?

@l0b0
Copy link

l0b0 commented Mar 7, 2018

Yes, thank you! Apropos, the message saying that the file was opened read-only disappeared after about 300 ms without any user intervention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants