-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/etc is unwritable on --chroot on debootstrap system #5230
Comments
Can you try with
There were recent changes to |
Unfortunately it seems to change nothing, that is, exact same errors. |
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 |
|
No I wasn't - only as shown in the bug report.
|
For what it's worth, I've tried the |
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? |
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. |
To avoid boolean confusion (`no-foo no` / `no-foo yes`) in firejail.config: etc-no-blacklisted no etc-no-blacklisted yes Commands used to search and replace: git grep -Ilz -i 'etc.no.blacklisted' -- etc src | xargs -0 -I '{}' sh -c "printf '%s\n' \"\$(sed \ -e 's/etc-no-blacklisted/etc-hide-blacklisted/' \ -e 's/ETC_NO_BLACKLISTED/ETC_HIDE_BLACKLISTED/' \ '{}')\" >'{}'" Added on commit ded5020 ("opt-in: skip blacklisted files in private-etc - netblue30#5010, netblue30#5230", 2023-01-15) / PR netblue30#5591.
To make it clearer. Added on commit ded5020 ("opt-in: skip blacklisted files in private-etc - netblue30#5010, netblue30#5230", 2023-01-15) / PR netblue30#5591.
Let users know that enabling this may break /etc/resolv.conf. Added on commit ded5020 ("opt-in: skip blacklisted files in private-etc - netblue30#5010, netblue30#5230", 2023-01-15) / PR netblue30#5591.
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.
apt
result in errors when attempting write to /etc.Steps to Reproduce
(as root)
emerge -qv firejail
echo "force-nonewprivs yes" >> /etc/firejail/firejail.config
mkdir /jail
debootstrap --arch=amd64 stable /jail
LC_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 foo
Expected 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 yes
as suggested by the documentation.Similar commands such as
useradd
or unrelated commands like callingapt
are also failing:Environment
firejail --version
).Checklist
/usr/bin/vlc
) "fixes" it).https://github.com/netblue30/firejail/issues/1139
)--noprofile
as per the docs.browser-allow-drm yes
/browser-disable-u2f no
infirejail.config
to allow DRM/U2F in browsers.--profile=PROFILENAME
to set the right profile. (Only relevant for AppImages)Log
Output of
LC_ALL=C firejail --debug /path/to/program
The text was updated successfully, but these errors were encountered: