mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #699] Modifying firefox install dir inside jail but not outside #477
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#477
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 @unixpipecentipede on GitHub (Aug 11, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/699
Is it possible to create/copy new files into a jail filesystem?
For example, a
firefox-esrinstance running in a jail with 2 new files in the installation directory:In the jail firefox acknowledges the files. In the original filesystem everything remains intact, thus not altering the original
firefox-esrinstallation directory upon closing the jail.I'm not familiar with the subject but in proper terms the original installation dir should be copied into the jail along with the new files (not mounted) before running firefox?
@chiraag-nataraj commented on GitHub (Aug 12, 2016):
The easiest way would be to set up a wrapper script that ends up calling firefox but sets up the environment first.
@unixpipecentipede commented on GitHub (Aug 12, 2016):
@chiraag-nataraj i.e. calling the wrapper script through firejail?
The wrapper doing:
These actions shouldn't change the base filesystem, right?
@chiraag-nataraj commented on GitHub (Aug 12, 2016):
Hmmm....so I guess the only way that would work is if you do a overlay-tmpfs on top of /usr/lib/firefox-esr. Actually, that might be the easier way (without scripts) - do an overlay-tmpfs between the original /usr/lib/firefox-esr and the directory containing mozilla.cfg and between the original /usr/lib/firefox-esr/defaults/prefs and the directory containing local-settings.js
@netblue30 commented on GitHub (Aug 13, 2016):
I've found out this description about "Locking preferences" on Mozilla site: http://kb.mozillazine.org/Locking_preferences
We are gonna have to support it, but for now you can use --bind. Unfortunately, --bind is available only if you start as root, something like this:
Now, you are root in as sandbox with your two files mounted. You switch to your regular user and start firefox:
The second sandbox (firejail --force firefox) is the one doing all the security, the first one is just setting the filesystem.
@unixpipecentipede commented on GitHub (Aug 15, 2016):
Sadly the files must previously exist before binding them:
Don't know if it's desirable to create non-existing files when using
--bind.@netblue30 commented on GitHub (Aug 15, 2016):
No.
@netblue30 commented on GitHub (Sep 6, 2016):
The purpose of local-settings.js and mozilla.cfg is to lock all the users in a specific firefox configuration. I don't think I can change these files.