[GH-ISSUE #3429] Firejail should report which profile it can't load in an include chain #2156

Closed
opened 2026-05-05 08:49:58 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @zupatisc on GitHub (May 22, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3429

Bug and expected behavior

  • When there is an error in a profile file that is included by an applications profile firejail will return "Error: cannot access profile file".
  • For me I had to remove all disable-* includes but there was never any hint from firejail as to what file it had problems reading, I think it should.

Reproduce
Steps to reproduce the behavior:
Other context about the problem like related errors to understand the problem.

  1. Create an rtorrent.profile in ~/.config/firejail
  2. Include rtorrent's profile found in /etc/firejail/
  3. Run in bash firejail rtorrent
  4. See error Error: cannot access profile file

Environment

  • Linux 5.6.12-artix1-1
  • firejail --version: 0.9.56

Additional context
I've had problems with the disable-* files and creating customizations for very long and with firejail build straight from git, the normal arch package and firejail-git and I suspect it's related this. I reinstalled using the -git AUR package just before creating this and made sure the files in /etc/firejail aren't old.

Originally created by @zupatisc on GitHub (May 22, 2020). Original GitHub issue: https://github.com/netblue30/firejail/issues/3429 **Bug and expected behavior** - When there is an error in a profile file that is included by an applications profile firejail will return "Error: cannot access profile file". - For me I had to remove all disable-* includes but there was never any hint from firejail as to what file it had problems reading, I think it should. **Reproduce** Steps to reproduce the behavior: Other context about the problem like related errors to understand the problem. 1. Create an rtorrent.profile in ~/.config/firejail 2. Include rtorrent's profile found in /etc/firejail/ 3. Run in bash `firejail rtorrent` 4. See error `Error: cannot access profile file` **Environment** - Linux 5.6.12-artix1-1 - firejail --version: 0.9.56 **Additional context** I've had problems with the disable-* files and creating customizations for very long and with firejail build straight from git, the normal arch package and firejail-git and I suspect it's related this. I reinstalled using the -git AUR package just before creating this and made sure the files in /etc/firejail aren't old.
Author
Owner

@rusty-snake commented on GitHub (May 22, 2020):

I can not reproduce this (firejail-git). What exactly did you add to .config/firejail/rtorrent.profile?

$ echo "nclude rtorrent.profile" > .config/firejail/rtorrent.profile
$ firejail --debug --profile=rtorrent.profile true
Error: inaccessible profile file: rtorrent.profile
$ echo "include /etc/firejail/rtorrent.profile" > .config/firejail/rtorrent.profile
$ firejail --debug --profile=rtorrent.profile true                                 
Error: inaccessible profile file: rtorrent.profile

Looks like the profile is printed on master.

git grep "cannot access profile" src:
3d61f52d4d/src/firejail/profile.c (L1572-L1581)

<!-- gh-comment-id:632657601 --> @rusty-snake commented on GitHub (May 22, 2020): I can not reproduce this (firejail-git). What exactly did you add to .config/firejail/rtorrent.profile? ``` $ echo "nclude rtorrent.profile" > .config/firejail/rtorrent.profile $ firejail --debug --profile=rtorrent.profile true Error: inaccessible profile file: rtorrent.profile $ echo "include /etc/firejail/rtorrent.profile" > .config/firejail/rtorrent.profile $ firejail --debug --profile=rtorrent.profile true Error: inaccessible profile file: rtorrent.profile ``` --- Looks like the profile is printed on master. `git grep "cannot access profile" src`: https://github.com/netblue30/firejail/blob/3d61f52d4d9b0a54ae13981332df921dcc5409f8/src/firejail/profile.c#L1572-L1581
Author
Owner

@zupatisc commented on GitHub (May 22, 2020):

The exact contents of ~/.config/firejail/rtorrent.profile are:

include /etc/firejail/rtorrent.profile

whitelist ${HOME}/Torrents
whitelist ${HOME}/.config/rtorrent
whitelist ${DOWNLOADS}

Odd that it should show the profile it encountered an error with but it really doesn't show it, only which profiles it could read. The standard profile works fine btw so maybe this has something to do with the relative directory to the files named for inclusion?

<!-- gh-comment-id:632901777 --> @zupatisc commented on GitHub (May 22, 2020): The exact contents of ~/.config/firejail/rtorrent.profile are: ``` include /etc/firejail/rtorrent.profile whitelist ${HOME}/Torrents whitelist ${HOME}/.config/rtorrent whitelist ${DOWNLOADS} ``` Odd that it should show the profile it encountered an error with but it really doesn't show it, only which profiles it could read. The standard profile works fine btw so maybe this has something to do with the relative directory to the files named for inclusion?
Author
Owner

@rusty-snake commented on GitHub (May 22, 2020):

wfm:

$ echo "include /etc/firejail/rtorrent.profile" > .config/firejail/rtorrent.profile
$ firejail --profile=rtorrent true
<!-- gh-comment-id:632909064 --> @rusty-snake commented on GitHub (May 22, 2020): wfm: ``` $ echo "include /etc/firejail/rtorrent.profile" > .config/firejail/rtorrent.profile $ firejail --profile=rtorrent true ```
Author
Owner

@zupatisc commented on GitHub (May 23, 2020):

No dice for me, I'll try firejail on a second install then, maybe it's just something sideways with this current one. Thanks for the quick responses anyway.

<!-- gh-comment-id:633040156 --> @zupatisc commented on GitHub (May 23, 2020): No dice for me, I'll try firejail on a second install then, maybe it's just something sideways with this current one. Thanks for the quick responses anyway.
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#2156
No description provided.