mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #5230] /etc is unwritable on --chroot on debootstrap system #2928
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#2928
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 @rayment on GitHub (Jul 4, 2022).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5230
Description
Following the documentation at https://firejail.wordpress.com/documentation-2/basic-usage/ concerning the usage of firejail for creating an isolated debootstrap system, I am unable to create a user account and installing packages via.
aptresult in errors when attempting write to /etc.Steps to Reproduce
(as root)
emerge -qv firejailecho "force-nonewprivs yes" >> /etc/firejail/firejail.configmkdir /jaildebootstrap --arch=amd64 stable /jailLC_ALL=C TERM=xterm-color firejail --noprofile --chroot=/jail --shell=/bin/bash(note this already deviates from the documentation as the provided command will actually fail without setting--shell)adduser fooExpected behavior
Actual behavior
Additional context
I'm not sure if this is really a bug or merely a configuration error or a lack of concise documentation, but this occurs using the default firejail v0.9.68 as it comes on Gentoo with the only change in configuration being
force-nonewprivs yesas suggested by the documentation.Similar commands such as
useraddor unrelated commands like callingaptare also failing:Environment
firejail --version).Checklist
/usr/bin/vlc) "fixes" it).https://github.com/netblue30/firejail/issues/1139)--noprofileas per the docs.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 --debug /path/to/program@rusty-snake commented on GitHub (Jul 4, 2022):
Can you try with
--writable-etc.There were recent changes to
--shellbut it should be investigated what--chrootchanges on it.@rayment commented on GitHub (Jul 4, 2022):
Unfortunately it seems to change nothing, that is, exact same errors.
@smitsohu commented on GitHub (Jul 12, 2022):
The reason is probably that nowadays Firejail creates lots of mount points in /etc, and kernel doesn't allow us to rename a mount point.
@rayment Just for me to clarify, do you use any of
--dnsor--ip=dhcpor--ip6=dhcp?@rusty-snake commented on GitHub (Jul 12, 2022):
https://github.com/netblue30/firejail/issues/5010#issuecomment-1098700858
@rayment commented on GitHub (Jul 13, 2022):
No I wasn't - only as shown in the bug report.
@rayment commented on GitHub (Jul 13, 2022):
For what it's worth, I've tried the
--writable-etcflag with--read-writeon a combination of files and folders including/etcand/etc/passwdwith no success.@smitsohu commented on GitHub (Jul 17, 2022):
If the conclusion from #5010 is to revert the offending commit, then that would obviously solve this issue as well.
Otherwise, would it make sense to add a hotfix in master?
chroot-hotfix.patch.txt
@rayment commented on GitHub (Jul 18, 2022):
I can confirm that this completely fixes my issue by using a custom ebuild on Gentoo with this patch compiled with 0.9.70.
While I wait for an update I'll use this solution, thank you very much.