mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2873] keepassxc: cannot save database file (whitelisting issue) #1796
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#1796
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @crass on GitHub (Jul 27, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2873
Here is some strace output showing KeepassXC saving an open database
So it has an open fd to the saved database, whose path has been unlinked. It tries to link the fd to the desired path, but that path already exists because that's the database without changes. Then it creates a temporary path from fd. Next it tries to rename the temporary file to the db name, but fails.
Using rename like this is a common technique here's an excerpt from the man page for rename:
I believe the reason rename is failing is ultimately because the path is a mount point (because its mount binded with whitelist) and those can't be renamed.
Ok, so I'd expect this to be a common behavior for many apps. Is there a solution for this that doesn't require modifying the app? I know that if I put the file in a directory and whitelist the directory, then everything works fine (the mount point is the dir now, instead of the file in the dir).
Is this documented somewhere? If not, where should it be? The user may not even realize that the problem is resulting because of firejail. How to make them aware as painlessly as possible?
@crass commented on GitHub (Jul 27, 2019):
Ok, I now see this is a well known issue as I suspected. See #2071, #1355, #1793. So closing