mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #2617] ElectronMail cannot read or write config files #1657
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#1657
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 @ghost on GitHub (Mar 24, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2617
The launch for ElectronMail is done this way:
ElectronMail has Chromium embedded in it. Config files are in
"$HOME"/.config/electron-mail. The program runs as if it's a first launch with no configuration. When config parameters are entered they work for the session but when the firejail closes"$HOME"/.config/electron-mailstill shows no updated files. Every time ElectronMail runs it's as if it's the first run. But when I run outside firejail the existing configuration is found and used.The output log shows that the directory is whitelisted:
$HOME/.config/is a symbolic link to$HOME/apps/conf/.The
/var/log/syslogfile shows no attempts on blacklisted objects. I've also run with--noprofileand it makes no difference.no tracelog
It's difficult to troubleshoot the problem because the
--tracelogcommand is broken.version
firejail version 0.9.44.8
@smitsohu commented on GitHub (Mar 25, 2019):
Thanks for your report.
Two problems here: One is a limitation (or let's call it a bug) in how Firejail handles symbolic links and whitelisting.
Currently a symbolic link is only detected (and created) if the symbolic link is also the file to be whitelisted, or in other words if the last path element is the link. It probably would be good if Firejail could handle symlinks more generously; especially symlinked ~/.config directories seem to be not uncommon, for example see also #2329.
Once whitelisting is solved, you are going to run into a second problem, assuming your systems are using Pulseaudio.
To work around a bug in older Pulseaudio versions (#69), Firejail mounts a new
~/.config/pulse/client.conffile inside the sandbox. In order to not fall victim to symlink attacks, we have to exclude in a reliable way that~/.configis a symbolic link, and print an error if that is the case.However, this Pulseaudio bug has been fixed in version 10, so if
pulseaudio --versionreturns 10 or higher, you actually don't need Firejail's workaround and you can disable it withnoautopulse(put it in/etc/firejail/globals.local).It probably would be good if Firejail could do something like this just automatically.
@smitsohu commented on GitHub (Mar 25, 2019):
I just realize there is no
noautopulsein 0.9.44, it was added in 0.9.54.@ghost commented on GitHub (Mar 25, 2019):
I got it to work simply by not using any lists:
Although I guess there's no point in that because if I understand correctly there's effectively no sandboxing protection. In principle a good protection to add might be to use a netfilter that blocks connections to Google, since the Electronjs browser is Chromium we can expect it to attempt to phone home.
@ghost commented on GitHub (Mar 25, 2019):
Firejail is actually detecting and mapping the symlink correctly, but still fails if the app tries to use the symlink. A better workaround is to force the app to use the non-symbolic path:
That works.
@ghost commented on GitHub (Mar 29, 2019):
Since the symbolic link issue is known and probably being worked in other issues, I'll close this one.