[GH-ISSUE #6793] buku: Error: no suitable /usr/bin/buku executable found (python-exec on Gentoo) #3374

Open
opened 2026-05-05 09:56:56 -06:00 by gitea-mirror · 8 comments
Owner

Originally created by @amano-kenji on GitHub (Jun 29, 2025).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6793

Description

Executing /usr/bin/buku through firejail fails because the file permission of /usr/lib/python-exec/python-exec2 is 600 instead of 755.

Steps to Reproduce

  1. firejail buku ...

Expected behavior

No error

Actual behavior

$ firejail buku --help
Error: no suitable /usr/bin/buku executable found

Behavior without a profile

$ firejail --noprofile /usr/bin/buku --help
help text

Additional context

Environment

  • Name/version/arch of the Linux kernel (uname -srm): Linux 6.6.92-gentoo x86_64
  • Name/version of the Linux distribution (e.g. "Ubuntu 20.04" or "Arch Linux"): Gentoo Linux
  • Version of Firejail (firejail --version): 0.9.74

Checklist

  • The issues is caused by firejail (i.e. running the program by path (e.g. /usr/bin/vlc) "fixes" it).
  • I can reproduce the issue without custom modifications (e.g. globals.local).
  • The program has a profile. (If not, request one in https://github.com/netblue30/firejail/issues/1139)
  • The profile (and redirect profile if exists) hasn't already been fixed upstream.
  • I have performed a short search for similar issues (to avoid opening a duplicate).
    • I'm aware of browser-allow-drm yes/browser-disable-u2f no in firejail.config to allow DRM/U2F in browsers.
  • I used --profile=PROFILENAME to set the right profile. (Only relevant for AppImages)

Log

Output of LC_ALL=C firejail /path/to/program

Error: no suitable /usr/bin/buku executable found

Output of LC_ALL=C firejail --debug /path/to/program

...
Disable /usr/bin/aa-exec
Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-notify)
Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-disable)
Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-autodep)
Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-logprof)
Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-genprof)
Disable /usr/bin/aa-load
Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-mergeprof)
Disable /usr/bin/aa-decode
Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-complain)
Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-enforce)
Disable /usr/bin/aa-remove-unknown
Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-audit)
Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-unconfined)
Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-easyprof)
Disable /usr/bin/aa-status
Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-cleanprof)
Disable /usr/bin/aa-features-abi
...

Originally created by @amano-kenji on GitHub (Jun 29, 2025). Original GitHub issue: https://github.com/netblue30/firejail/issues/6793 <!-- See the following links for help with formatting: https://guides.github.com/features/mastering-markdown/ https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax --> ### Description Executing /usr/bin/buku through firejail fails because the file permission of /usr/lib/python-exec/python-exec2 is 600 instead of 755. ### Steps to Reproduce 1. firejail buku ... ### Expected behavior No error ### Actual behavior ``` $ firejail buku --help Error: no suitable /usr/bin/buku executable found ``` ### Behavior without a profile ``` $ firejail --noprofile /usr/bin/buku --help help text ``` ### Additional context ### Environment - Name/version/arch of the Linux kernel (`uname -srm`): Linux 6.6.92-gentoo x86_64 - Name/version of the Linux distribution (e.g. "Ubuntu 20.04" or "Arch Linux"): Gentoo Linux - Version of Firejail (`firejail --version`): 0.9.74 ### Checklist <!-- Note: Items are checked with an "x", like so: - [x] This is a checked item. --> - [x] The issues is caused by firejail (i.e. running the program by path (e.g. `/usr/bin/vlc`) "fixes" it). - [x] I can reproduce the issue without custom modifications (e.g. globals.local). - [x] The program has a profile. (If not, request one in `https://github.com/netblue30/firejail/issues/1139`) - [x] The profile (and redirect profile if exists) hasn't already been fixed [upstream](https://github.com/netblue30/firejail/tree/master/etc). - [x] I have performed a short search for similar issues (to avoid opening a duplicate). - [x] I'm aware of `browser-allow-drm yes`/`browser-disable-u2f no` in `firejail.config` to allow DRM/U2F in browsers. - [x] I used `--profile=PROFILENAME` to set the right profile. (Only relevant for AppImages) ### Log <details> <summary>Output of <code>LC_ALL=C firejail /path/to/program</code></summary> <p> ``` Error: no suitable /usr/bin/buku executable found ``` </p> </details> <details> <summary>Output of <code>LC_ALL=C firejail --debug /path/to/program</code></summary> <p> ``` ... Disable /usr/bin/aa-exec Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-notify) Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-disable) Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-autodep) Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-logprof) Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-genprof) Disable /usr/bin/aa-load Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-mergeprof) Disable /usr/bin/aa-decode Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-complain) Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-enforce) Disable /usr/bin/aa-remove-unknown Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-audit) Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-unconfined) Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-easyprof) Disable /usr/bin/aa-status Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-cleanprof) Disable /usr/bin/aa-features-abi ... ``` </p> </details>
Author
Owner

@kmk3 commented on GitHub (Jun 29, 2025):

Executing /usr/bin/buku through firejail fails because the file permission of
/usr/lib/python-exec/python-exec2 is 600 instead of 755.

Why do you think that?

Output of LC_ALL=C firejail /path/to/program

Error: no suitable /usr/bin/buku executable found

Output of LC_ALL=C firejail --debug /path/to/program

...
Disable /usr/bin/aa-exec
Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-notify)
Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-disable)
Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-autodep)
Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-logprof)
Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-genprof)
...

Do you have apparmor enabled?

What is the output of the following?

ls -l /usr/bin/buku /usr/bin/aa-* /usr/lib/python-exec/python-exec2

Does it work with the following in ~/.config/firejail/buku.local?

ignore apparmor
ignore private-bin

If not, you can try commenting the profile to see which lines are causing the
problem and post them here.

<!-- gh-comment-id:3016575844 --> @kmk3 commented on GitHub (Jun 29, 2025): > Executing /usr/bin/buku through firejail fails because the file permission of > /usr/lib/python-exec/python-exec2 is 600 instead of 755. Why do you think that? > Output of `LC_ALL=C firejail /path/to/program` > > ``` > Error: no suitable /usr/bin/buku executable found > ``` > > Output of `LC_ALL=C firejail --debug /path/to/program` > > ``` > ... > Disable /usr/bin/aa-exec > Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-notify) > Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-disable) > Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-autodep) > Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-logprof) > Disable /usr/lib/python-exec/python-exec2 (requested /usr/bin/aa-genprof) > ... > ``` Do you have apparmor enabled? What is the output of the following? ```sh ls -l /usr/bin/buku /usr/bin/aa-* /usr/lib/python-exec/python-exec2 ``` Does it work with the following in ~/.config/firejail/buku.local? ``` ignore apparmor ignore private-bin ``` If not, you can try commenting the profile to see which lines are causing the problem and post them here.
Author
Owner

@amano-kenji commented on GitHub (Jun 30, 2025):

bash-5.2$ ls -lh /usr/bin/buku /usr/bin/aa-* /usr/lib/python-exec/python-exec2
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-audit -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-autodep -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-cleanprof -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-complain -> ../lib/python-exec/python-exec2
-r-------- 1 nobody nobody  0 Jun 30 13:56 /usr/bin/aa-decode
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-disable -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-easyprof -> ../lib/python-exec/python-exec2
-r-------- 1 nobody nobody  0 Jun 30 13:56 /usr/bin/aa-enabled
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-enforce -> ../lib/python-exec/python-exec2
-r-------- 1 nobody nobody  0 Jun 30 13:56 /usr/bin/aa-exec
-r-------- 1 nobody nobody  0 Jun 30 13:56 /usr/bin/aa-features-abi
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-genprof -> ../lib/python-exec/python-exec2
-r-------- 1 nobody nobody  0 Jun 30 13:56 /usr/bin/aa-load
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-logprof -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-mergeprof -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-notify -> ../lib/python-exec/python-exec2
-r-------- 1 nobody nobody  0 Jun 30 13:56 /usr/bin/aa-remove-unknown
-r-------- 1 nobody nobody  0 Jun 30 13:56 /usr/bin/aa-status
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-unconfined -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 nobody nobody 31 May  4 15:06 /usr/bin/buku -> ../lib/python-exec/python-exec2
-r-------- 1 nobody nobody  0 Jun 30 13:56 /usr/lib/python-exec/python-exec2

Welcome to gentoo linux where python programs are symlinks to /usr/lib/python-exec/python-exec2.

Adding

ignore apparmor
ignore private-bin

to ~/.config/firejail/buku.local doesn't fix the issue.

Commenting out include disable-common.inc fixes the issue. I'm trying to figure out why disable-common.inc breaks buku.profile.

<!-- gh-comment-id:3018710075 --> @amano-kenji commented on GitHub (Jun 30, 2025): ``` bash-5.2$ ls -lh /usr/bin/buku /usr/bin/aa-* /usr/lib/python-exec/python-exec2 lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-audit -> ../lib/python-exec/python-exec2 lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-autodep -> ../lib/python-exec/python-exec2 lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-cleanprof -> ../lib/python-exec/python-exec2 lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-complain -> ../lib/python-exec/python-exec2 -r-------- 1 nobody nobody 0 Jun 30 13:56 /usr/bin/aa-decode lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-disable -> ../lib/python-exec/python-exec2 lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-easyprof -> ../lib/python-exec/python-exec2 -r-------- 1 nobody nobody 0 Jun 30 13:56 /usr/bin/aa-enabled lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-enforce -> ../lib/python-exec/python-exec2 -r-------- 1 nobody nobody 0 Jun 30 13:56 /usr/bin/aa-exec -r-------- 1 nobody nobody 0 Jun 30 13:56 /usr/bin/aa-features-abi lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-genprof -> ../lib/python-exec/python-exec2 -r-------- 1 nobody nobody 0 Jun 30 13:56 /usr/bin/aa-load lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-logprof -> ../lib/python-exec/python-exec2 lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-mergeprof -> ../lib/python-exec/python-exec2 lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-notify -> ../lib/python-exec/python-exec2 -r-------- 1 nobody nobody 0 Jun 30 13:56 /usr/bin/aa-remove-unknown -r-------- 1 nobody nobody 0 Jun 30 13:56 /usr/bin/aa-status lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-unconfined -> ../lib/python-exec/python-exec2 lrwxrwxrwx 1 nobody nobody 31 May 4 15:06 /usr/bin/buku -> ../lib/python-exec/python-exec2 -r-------- 1 nobody nobody 0 Jun 30 13:56 /usr/lib/python-exec/python-exec2 ``` Welcome to gentoo linux where python programs are symlinks to /usr/lib/python-exec/python-exec2. Adding ``` ignore apparmor ignore private-bin ``` to ~/.config/firejail/buku.local doesn't fix the issue. Commenting out `include disable-common.inc` fixes the issue. I'm trying to figure out why disable-common.inc breaks buku.profile.
Author
Owner

@amano-kenji commented on GitHub (Jun 30, 2025):

I think I figured out why disable-common.inc breaks buku.profile.

disable-common.inc contains blacklist ${PATH}/aa-*.

blacklist ${PATH}/aa-* ends up blacklisting /usr/lib/python-exec/python-exec2 because ${PATH}/aa-* files are symlinks to /usr/lib/python-exec/python-exec2.

Firejail doesn't blacklist the symlinks, but the files that symlinks point to. Thus, the fix is to prevent firejail from following blacklist symlinks.

On gentoo linux, firejail ends up blacklisting all python programs by blacklisting any python program.

<!-- gh-comment-id:3018726780 --> @amano-kenji commented on GitHub (Jun 30, 2025): I think I figured out why disable-common.inc breaks buku.profile. disable-common.inc contains `blacklist ${PATH}/aa-*`. `blacklist ${PATH}/aa-*` ends up blacklisting `/usr/lib/python-exec/python-exec2` because `${PATH}/aa-*` files are symlinks to `/usr/lib/python-exec/python-exec2`. Firejail doesn't blacklist the symlinks, but the files that symlinks point to. Thus, the fix is to prevent firejail from following blacklist symlinks. On gentoo linux, firejail ends up blacklisting all python programs by blacklisting any python program.
Author
Owner

@kmk3 commented on GitHub (Jul 1, 2025):

bash-5.2$ ls -lh /usr/bin/buku /usr/bin/aa-* /usr/lib/python-exec/python-exec2
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-audit -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-autodep -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-cleanprof -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-complain -> ../lib/python-exec/python-exec2
-r-------- 1 nobody nobody  0 Jun 30 13:56 /usr/bin/aa-decode
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-disable -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-easyprof -> ../lib/python-exec/python-exec2
-r-------- 1 nobody nobody  0 Jun 30 13:56 /usr/bin/aa-enabled
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-enforce -> ../lib/python-exec/python-exec2
-r-------- 1 nobody nobody  0 Jun 30 13:56 /usr/bin/aa-exec
-r-------- 1 nobody nobody  0 Jun 30 13:56 /usr/bin/aa-features-abi
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-genprof -> ../lib/python-exec/python-exec2
-r-------- 1 nobody nobody  0 Jun 30 13:56 /usr/bin/aa-load
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-logprof -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-mergeprof -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-notify -> ../lib/python-exec/python-exec2
-r-------- 1 nobody nobody  0 Jun 30 13:56 /usr/bin/aa-remove-unknown
-r-------- 1 nobody nobody  0 Jun 30 13:56 /usr/bin/aa-status
lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-unconfined -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 nobody nobody 31 May  4 15:06 /usr/bin/buku -> ../lib/python-exec/python-exec2
-r-------- 1 nobody nobody  0 Jun 30 13:56 /usr/lib/python-exec/python-exec2

What is the output of the following?

ls -al /usr/lib/python-exec

Welcome to gentoo linux where python programs are symlinks to
/usr/lib/python-exec/python-exec2.

How does that work? What exacly does python-exec2 end up executing?

That is, where are the real aa- binaries?

Also, does it execute python2 or does the "2" stand for something else?

If python-exec2 is a script, could you upload it here?

I think I figured out why disable-common.inc breaks buku.profile.

disable-common.inc contains blacklist ${PATH}/aa-*.

blacklist ${PATH}/aa-* ends up blacklisting
/usr/lib/python-exec/python-exec2 because ${PATH}/aa-* files are symlinks
to /usr/lib/python-exec/python-exec2.

Firejail doesn't blacklist the symlinks, but the files that symlinks point
to. Thus, the fix is to prevent firejail from following blacklist symlinks.

On gentoo linux, firejail ends up blacklisting all python programs by
blacklisting any python program.

I believe that blacklist following symlinks is the intended behavior
(likewise for whitelisting).

Does it work with the following in ~/.config/firejail/allow-python3.local?

noblacklist /usr/lib/python-exec
noblacklist /usr/lib/python-exec/python-exec2
<!-- gh-comment-id:3024647477 --> @kmk3 commented on GitHub (Jul 1, 2025): > ``` > bash-5.2$ ls -lh /usr/bin/buku /usr/bin/aa-* /usr/lib/python-exec/python-exec2 > lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-audit -> ../lib/python-exec/python-exec2 > lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-autodep -> ../lib/python-exec/python-exec2 > lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-cleanprof -> ../lib/python-exec/python-exec2 > lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-complain -> ../lib/python-exec/python-exec2 > -r-------- 1 nobody nobody 0 Jun 30 13:56 /usr/bin/aa-decode > lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-disable -> ../lib/python-exec/python-exec2 > lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-easyprof -> ../lib/python-exec/python-exec2 > -r-------- 1 nobody nobody 0 Jun 30 13:56 /usr/bin/aa-enabled > lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-enforce -> ../lib/python-exec/python-exec2 > -r-------- 1 nobody nobody 0 Jun 30 13:56 /usr/bin/aa-exec > -r-------- 1 nobody nobody 0 Jun 30 13:56 /usr/bin/aa-features-abi > lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-genprof -> ../lib/python-exec/python-exec2 > -r-------- 1 nobody nobody 0 Jun 30 13:56 /usr/bin/aa-load > lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-logprof -> ../lib/python-exec/python-exec2 > lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-mergeprof -> ../lib/python-exec/python-exec2 > lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-notify -> ../lib/python-exec/python-exec2 > -r-------- 1 nobody nobody 0 Jun 30 13:56 /usr/bin/aa-remove-unknown > -r-------- 1 nobody nobody 0 Jun 30 13:56 /usr/bin/aa-status > lrwxrwxrwx 1 nobody nobody 31 Jun 15 11:18 /usr/bin/aa-unconfined -> ../lib/python-exec/python-exec2 > lrwxrwxrwx 1 nobody nobody 31 May 4 15:06 /usr/bin/buku -> ../lib/python-exec/python-exec2 > -r-------- 1 nobody nobody 0 Jun 30 13:56 /usr/lib/python-exec/python-exec2 > ``` What is the output of the following? ```sh ls -al /usr/lib/python-exec ``` > Welcome to gentoo linux where python programs are symlinks to > /usr/lib/python-exec/python-exec2. How does that work? What exacly does `python-exec2` end up executing? That is, where are the real `aa-` binaries? Also, does it execute python2 or does the "2" stand for something else? If `python-exec2` is a script, could you upload it here? > I think I figured out why disable-common.inc breaks buku.profile. > > disable-common.inc contains `blacklist ${PATH}/aa-*`. > > `blacklist ${PATH}/aa-*` ends up blacklisting > `/usr/lib/python-exec/python-exec2` because `${PATH}/aa-*` files are symlinks > to `/usr/lib/python-exec/python-exec2`. > > Firejail doesn't blacklist the symlinks, but the files that symlinks point > to. Thus, the fix is to prevent firejail from following blacklist symlinks. > > On gentoo linux, firejail ends up blacklisting all python programs by > blacklisting any python program. I believe that `blacklist` following symlinks is the intended behavior (likewise for whitelisting). Does it work with the following in ~/.config/firejail/allow-python3.local? ``` noblacklist /usr/lib/python-exec noblacklist /usr/lib/python-exec/python-exec2 ```
Author
Owner

@amano-kenji commented on GitHub (Jul 2, 2025):

$ ls -al /usr/lib/python-exec
total 111
drwxr-xr-x  4 root root    5 Jun 30 22:29 ./
drwxr-xr-x 50 root root  132 Jun 30 22:30 ../
drwxr-xr-x  2 root root   11 Jun 29 10:53 python3.12/
drwxr-xr-x  2 root root  156 Jun 29 10:50 python3.13/
-rwxr-xr-x  1 root root 2899 May  4 13:13 python-exec2*

On gentoo linux, all python executables in /usr/bin are symlinks to /usr/lib/python-exec/python-exec2

python-exec2.txt

python-exec2 simply executes the executable module for the symlinking executable in /usr/bin.

If I execute /usr/bin/buku which is a symlink to /usr/lib/python-exec/python-exec2, python-exec2 detects the symlinking file's name and executes /usr/lib/python-exec/python3.13/buku

buku.txt

As you can see, /usr/lib/python-exec/python3.13/buku just uses buku python module.

<!-- gh-comment-id:3026565407 --> @amano-kenji commented on GitHub (Jul 2, 2025): ``` $ ls -al /usr/lib/python-exec total 111 drwxr-xr-x 4 root root 5 Jun 30 22:29 ./ drwxr-xr-x 50 root root 132 Jun 30 22:30 ../ drwxr-xr-x 2 root root 11 Jun 29 10:53 python3.12/ drwxr-xr-x 2 root root 156 Jun 29 10:50 python3.13/ -rwxr-xr-x 1 root root 2899 May 4 13:13 python-exec2* ``` On gentoo linux, all python executables in /usr/bin are symlinks to /usr/lib/python-exec/python-exec2 [python-exec2.txt](https://github.com/user-attachments/files/21012149/python-exec2.txt) python-exec2 simply executes the executable module for the symlinking executable in /usr/bin. If I execute /usr/bin/buku which is a symlink to /usr/lib/python-exec/python-exec2, python-exec2 detects the symlinking file's name and executes /usr/lib/python-exec/python3.13/buku [buku.txt](https://github.com/user-attachments/files/21012225/buku.txt) As you can see, /usr/lib/python-exec/python3.13/buku just uses buku python module.
Author
Owner

@amano-kenji commented on GitHub (Jul 2, 2025):

Adding

noblacklist /usr/lib/python-exec
noblacklist /usr/lib/python-exec/python-exec2

to ~/.config/firejail/allow-python3.local doesn't fix the issue. I don't think noblacklist is intelligent enough to handle this case.

<!-- gh-comment-id:3026568671 --> @amano-kenji commented on GitHub (Jul 2, 2025): Adding ``` noblacklist /usr/lib/python-exec noblacklist /usr/lib/python-exec/python-exec2 ``` to ~/.config/firejail/allow-python3.local doesn't fix the issue. I don't think `noblacklist` is intelligent enough to handle this case.
Author
Owner

@amano-kenji commented on GitHub (Jul 7, 2025):

This issue basically breaks every python application profile that contains disable-common.inc on gentoo linux.

<!-- gh-comment-id:3043646271 --> @amano-kenji commented on GitHub (Jul 7, 2025): This issue basically breaks every python application profile that contains disable-common.inc on gentoo linux.
Author
Owner

@amano-kenji commented on GitHub (Sep 29, 2025):

It turns out that this issue actually prevents all python executables on gentoo from being executed.

Adding noblacklist ${PATH}/aa-* to globals.local works around the issue.

<!-- gh-comment-id:3347172542 --> @amano-kenji commented on GitHub (Sep 29, 2025): It turns out that this issue actually prevents all python executables on gentoo from being executed. Adding `noblacklist ${PATH}/aa-*` to `globals.local` works around the issue.
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#3374
No description provided.