mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3146] Immutable ~/.mozilla with persistent ~/Downloads #1977
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#1977
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 @BreakfastSerial on GitHub (Jan 15, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3146
I want to use firejail with Firefox, having a temporary home and an immutable Firefox but keep all Downloads. The use-case isn't for high-security operations, but for daily use, so
--ls,--getand--putare not really viable.I did come across the following related issues:
However none of these resulted in appropriate solutions.
I've tried the following
firejail --read-only=~/.mozilla --whitelist=~/Downloads firefoxThis is also mentioned in the man page of firejail, but for me firefox isn't operable like this, as Firefox states
"Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.". Even if I use Firefox with the-no-remoteparameter.firejail --private-home=~/.mozilla,~/Downloads --whitelist=~/Downloads firefoxDoesn't allow persistent Downloads.
I've tried setting Firefox to use
/downloads(in the root directory) for all downloads, which doesn't seem to be a sane solution, but doesn't work anyways, as downloads fail to said directory without error message.Is there any way to have to have my downloads directory persistent but have all other modifications discarded when the sandbox is closed?
firejail version 0.9.58.2
Mozilla Firefox 72.0.1
Ubuntu 19.10
@rusty-snake commented on GitHub (Jan 15, 2020):
With an ro profile this seems reasonable to me.
untested idea:
firejail --profile=firefox --read-only='${HOME}/.mozilla' firefox --no-remote --ProfileManagerCreate a new profile in /tmp (
private-tmp).@BreakfastSerial commented on GitHub (Jan 15, 2020):
Thank you for your input.
I've tried the following:
firejail --profile=firefox --read-only='${HOME}/.mozilla' firefox -P "custom-user". This resulted in persistent downloads (in ~/Downloads) but also in persistent changes for Firefox! The browser history was written and add-ons changes were stored.edit: Sorry I've missed the part with the new Firefox profile in
/tmp. This seems to increase overhead, every time I start Firefox. If possible, I'd have my fixed Firefox profile, which I prepared outside of firejail and use that "read-only".@Vincent43 commented on GitHub (Jan 15, 2020):
I don't think firefox can function without being able to write into its config. You could use
firejail --overlay-tmpfs --ignore=private-tmp firefox, download things to/tmpand move them somewhere else manually.@BreakfastSerial commented on GitHub (Jan 16, 2020):
That sounds like it would be a reasonable trade-off between usability and security! I'll give it a try, thank you!
@dpellegr commented on GitHub (Oct 16, 2020):
Hello,
I am in a similar situation where I need a temporary folder and a persistent folder, both writable from the sandbox.
Unfortunately the workaround proposed by @Vincent43 does not work for me. Indeed am using
--private-tmpto store stuff which should be isolated between multiple sandboxes. In addition, as the persistent folder is used for logs (which are continuously written), it would really be better to have them in place, instead of having to periodically synchronize them, with chances of loosing (part of) them.It doesn't seem conceptually difficult, but I am lost in the myriad of options... Any idea?
@rusty-snake commented on GitHub (Oct 20, 2020):
For now you maybe can use
--private-cache, which makes ~/.cache a tmpfs. In the future: #3676.