mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3883] Getting "Permission denied" when running Electron apps with --no-sandbox #2442
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#2442
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 @mYnDstrEAm on GitHub (Jan 12, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3883
How can one run Electron apps that use a new version of Electron with Firejail?
This works:
/home/username/Downloads/dir/appName --no-sandboxThis doesn't:
firejail --profile=/etc/firejail/electron.profile /home/username/Downloads/dir/appName --no-sandboxThe output is:
(Moved it to ~/Downloads/dir to prevent
No such file or directoryerrors.)sudo less /var/log/syslog | grep appNameshows:I also tried it with
--ignore=disable-mnt --ignore=nodbusSystem: Debian 10/KDE
Firejail version: 0.9.64 (with /etc/firejail/electron.profile of that version)
Some electron apps work even without setting --no-sandbox so it's probably already solved/solvable somehow.
Possibly related issues (will remove the links if not found to be related later): #3586 #3871 #2690 #2946
@rusty-snake commented on GitHub (Jan 12, 2021):
apparmormakes your${HOME}noexec.Compare
firejail --noprofile /home/username/Downloads/dir/appName --no-sandbox(which I expect to work) andfirejail --noprofile --apparmor /home/username/Downloads/dir/appName --no-sandboxIt should work if you add
--ignore=apparmor '--ignore=noexec ${HOME}'(the last one is required for firejail >=0.9.65 and has no effect on firejail 0.9.64).@mYnDstrEAm commented on GitHub (Jan 12, 2021):
Thank you! So the solution until firejail v >=0.9.65 hits the Debian backports repos seems to be: running
cp /etc/firejail/electron.profile ~/.config/firejail/electron-apps.profile && kate ~/.config/firejail/electron-apps.profile, commenting outapparmorthere and then runningfirejail --profile=~/.config/firejail/electron-apps.profile /home/username/Downloads/dir/appName --no-sandbox.If you know of a (similar but) better / hardened solution (like keeping apparmor in that profile and only removing that noexec part) until that occurs please leave comment, closing this.
@rusty-snake commented on GitHub (Jan 12, 2021):
https://github.com/netblue30/firejail/issues/3629#issuecomment-702791887
https://github.com/netblue30/firejail/issues/2987#issuecomment-538667565
https://github.com/netblue30/firejail/issues/2938#issuecomment-526827774
@mYnDstrEAm commented on GitHub (Jan 12, 2021):
In Debian (in other OS it might be firejail-local) this should work and seems to be the better solution:
echo "owner /home/username/dir-to-place-electron-build-dir-in/** ix," | sudo tee -a /etc/apparmor.d/local/firejail-default && sudo apparmor_parser -r /etc/apparmor.d/local/firejail-defaultThe problem with that is that I get:
AppArmor parser error for /etc/apparmor.d/local/firejail-default in /etc/apparmor.d/local/firejail-default at line 1: syntax error, unexpected TOK_OWNER, expecting $endand did not find the error-message self-explanatory or explained anywhere online. The firejail-default file was (and is) otherwise empty and there is no firejail-local (nor a dedicated apparmor profile for the specific electron app).@kmk3 commented on GitHub (Jan 14, 2021):
If you want to ignore apparmor on all profiles that include electron.profile,
you can just do this instead:
echo 'ignore apparmor' >>~/.config/firejail/electron.localThen you could just run it like this:
firejail --profile=/etc/firejail/electron.profile /home/username/Downloads/dir/appName --no-sandboxOr, if you want to use a separate profile for the programs in
/home/username/Downloads:
Run it with:
firejail --profile=~/.config/firejail/electron-apps.profile /home/username/Downloads/dir/appName --no-sandbox