mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6442] bitwarden: using electron.profile blacklists ~/.config/Bitwarden #3273
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#3273
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 @tmstn on GitHub (Aug 23, 2024).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6442
Description
I can run bitwarden-desktop on Manjaro once but the second time it will not start because the .config/Bitwarden directory has had its ownership changed to root:root
Steps to Reproduce
mkdir /home/$USER/bitwarden-tempfirejail --name=bitwarden --private=/home/$USER/bitwarden-temp --x11=xpra --profile=/etc/firejail/electron.profile bitwarden-desktopfirejail --listto get the process idfirejail --join=[id]ls -la ~/.configand you will see that theBitwardenis owned by$USER:$USERexitthe sandbox shell sessionfirejail --shutdown=[id]firejail --name=bitwarden --private=/home/$USER/bitwarden-temp --x11=xpra --profile=/etc/firejail/electron.profile bitwarden-desktopagain/home/$USER/.config/Bitwardendirectoryfirejail --listto get the process idfirejail --join=[id]ls -la ~/.configand you will see that theBitwardendirectory is owned byroot:rootExpected behavior
The
/home/$USER/.config/Bitwardendirectory should always be owned by$USER:$USER. It is a user directory in the home folder.Actual behavior
The
/home/$USER/.config/Bitwardendirectory is owned byroot:root.Behavior without a profile
When running
LC_ALL=C firejail --name=bitwarden --private=/home/$USER/bitwarden-temp --x11=xpra --noprofile bitwarden-desktopit opened without issue multiple times.Environment
Checklist
/usr/bin/vlc) "fixes" it).https://github.com/netblue30/firejail/issues/1139)browser-allow-drm yes/browser-disable-u2f noinfirejail.configto allow DRM/U2F in browsers.--profile=PROFILENAMEto set the right profile. (Only relevant for AppImages)Log
Output of
LC_ALL=C firejail --name=bitwarden --private=/home/tom/down/bitwarden --x11=xpra --profile=/etc/firejail/electron.profile bitwarden-desktoplink to gist
Output of
LC_ALL=C firejail --debug --name=bitwarden --private=/home/tom/down/bitwarden --x11=xpra --profile=/etc/firejail/electron.profile bitwarden-desktoplink to gist
@ghost commented on GitHub (Aug 23, 2024):
Hi, thanks for reporting this. I've installed bitwarden-desktop on my Arch Linux box to reproduce. Coincidentally the package just got updated, so I probably have different versions here, but AFAICT that shouldn't affect things.
We indeed have a bug here:
/usr/bin/bitwarden-desktopis ashellscript, and theinclude disable-shell.incoption breaks that. I'll be fixing that in git shortly. Not sure if that's why you used theelectron.profile, but this needs your attention regardless.The procedure you kindly supplied above can be simplified a bit, so instead of using the longish CLI commands I've opted to create a simple override you can use (until a new release containing a fix reaches the Manjaro repo's) with
firejail /usr/bin/bitwarden-desktop:On my machine things seem to work just fine with the above profile changes. No ownership/permission changes on ~/.config/Bitwarden and the app starts and runs as expected AFAICT.
Please integrate the above override file on your side and retest.
HTH
@rusty-snake commented on GitHub (Aug 23, 2024):
Please use minimal STR whenever possible.
You're running bitwarden with a profile that was not written to be used with bitwarden-desktop.
It includes commands that
blacklist ${HOME}/.config/Bitwarden.This is expected behaviour.
@tmstn commented on GitHub (Aug 23, 2024):
Thanks, that works!.
The reason I was using the
electron.profilewas because bitwarden wouldn't start at all without it and was reporting the error:The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /usr/lib/electron29/chrome-sandbox is owned by root and has mode 4755