[GH-ISSUE #2160] file profile not working with 'private-bin file' #1463

Closed
opened 2026-05-05 08:07:41 -06:00 by gitea-mirror · 0 comments
Owner

Originally created by @ghost on GitHub (Oct 11, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2160

Hi, I'm unable to sandbox file, seems like private-bin is the culprit, at least on Arch:

$ grep "private-bin" /etc/firejail/file.profile
private-bin file

$ firejail --ignore=quiet --profile=/etc/firejail/file.profile /usr/bin/file /usr/bin/whoami
Reading profile /etc/firejail/file.profile
Reading profile /etc/firejail/globals.local
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-passwdmgr.local
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/disable-programs.local
Parent pid 5081, child pid 5082

Warning: skipping magic.mgc for private /etc
Warning: skipping magic for private /etc
Private /etc installed in 2.06 ms
1 program installed in 2.13 ms
Standard C library installed in 73.93 ms
Program libraries installed in 10.30 ms
Installed 22 libraries and 2 directories
Blacklist violations are logged to syslog
Child process initialized in 205.49 ms
/usr/bin/whoami: cannot open '/usr/bin/whoami' (No such file or directory)

Parent is shutting down, bye...

$ sudo sed -i -e 's/private-bin/#private-bin/' /etc/firejail/file.profile
$ grep "private-bin" /etc/firejail/file.profile
#private-bin file

$ firejail --ignore=quiet --profile=/etc/firejail/file.profile /usr/bin/file /usr/bin/whoami
Reading profile /etc/firejail/file.profile
Reading profile /etc/firejail/globals.local
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-passwdmgr.local
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/disable-programs.local
Parent pid 7943, child pid 7944

Warning: skipping magic.mgc for private /etc
Warning: skipping magic for private /etc
Private /etc installed in 6.09 ms
Standard C library installed in 84.32 ms
Program libraries installed in 8.01 ms
Installed 22 libraries and 2 directories
Blacklist violations are logged to syslog
Child process initialized in 262.12 ms
/usr/bin/whoami: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=5c1def743247c5347791fda4fe51bcf76ead91ec, stripped

Working on a PR, regards.

Originally created by @ghost on GitHub (Oct 11, 2018). Original GitHub issue: https://github.com/netblue30/firejail/issues/2160 Hi, I'm unable to sandbox `file`, seems like `private-bin` is the culprit, at least on Arch: $ grep "private-bin" /etc/firejail/file.profile private-bin file $ firejail --ignore=quiet --profile=/etc/firejail/file.profile /usr/bin/file /usr/bin/whoami Reading profile /etc/firejail/file.profile Reading profile /etc/firejail/globals.local Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-passwdmgr.inc Reading profile /etc/firejail/disable-passwdmgr.local Reading profile /etc/firejail/disable-programs.inc Reading profile /etc/firejail/disable-programs.local Parent pid 5081, child pid 5082 Warning: skipping magic.mgc for private /etc Warning: skipping magic for private /etc Private /etc installed in 2.06 ms 1 program installed in 2.13 ms Standard C library installed in 73.93 ms Program libraries installed in 10.30 ms Installed 22 libraries and 2 directories Blacklist violations are logged to syslog Child process initialized in 205.49 ms /usr/bin/whoami: cannot open '/usr/bin/whoami' (No such file or directory) Parent is shutting down, bye... $ sudo sed -i -e 's/private-bin/#private-bin/' /etc/firejail/file.profile $ grep "private-bin" /etc/firejail/file.profile #private-bin file $ firejail --ignore=quiet --profile=/etc/firejail/file.profile /usr/bin/file /usr/bin/whoami Reading profile /etc/firejail/file.profile Reading profile /etc/firejail/globals.local Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-passwdmgr.inc Reading profile /etc/firejail/disable-passwdmgr.local Reading profile /etc/firejail/disable-programs.inc Reading profile /etc/firejail/disable-programs.local Parent pid 7943, child pid 7944 Warning: skipping magic.mgc for private /etc Warning: skipping magic for private /etc Private /etc installed in 6.09 ms Standard C library installed in 84.32 ms Program libraries installed in 8.01 ms Installed 22 libraries and 2 directories Blacklist violations are logged to syslog Child process initialized in 262.12 ms /usr/bin/whoami: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=5c1def743247c5347791fda4fe51bcf76ead91ec, stripped Working on a PR, regards.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1463
No description provided.