less (firejail) unable to open files

Parrot 4.6 KDE
i’m unable to access some file with less

charles@saga ~/.config/i3 (KDE5Plasma) $ ll
total 8
drwxr-xr-x 1 charles charles   12 Aug  9 13:09 ./
drwxr-xr-x 1 charles charles 2516 Aug  9 12:42 ../
-rw-r--r-- 1 charles charles 6504 Aug  9 13:09 config
charles@saga ~/.config/i3 (KDE5Plasma) $ less config  
config: No such file or directory
charles@saga ~/.config/i3 (KDE5Plasma) $ which less
/usr/local/bin/less

at the same time, it works, when i use /usr/bin/less
if i understand it correctly firejail is responsible for /usr/local/bin/less
so i’ve created a local config file for it, but it doesn’t help
~/.config/firejail/less.local
noblacklist ${HOME}/*
noblacklist ${HOME}/.*

i guess i’m missing some tiny detail here :frowning:

maybe i am wrong but the config files for firejail should be unter /etc/firejail or not?

Firejail configs in ~/.config/firejail/ take precedence over profiles in /etc/firejail/. Therefore if a user wants to modify a firejail sandbox, they should put the configs inside there local directory. This means they don’t have to change the ones provided by the distribution and you can also have different rules for different users. https://firejail.wordpress.com/documentation-2/building-custom-profiles/

I had a look at this and i think i know whats happening. If a directory is blacklisted by firejail you will get a ‘permission denied’ message, not a ‘no such file’. I am going to guess that if you provide the full file path to less it will work.

charles@saga ~/.config/i3 (KDE5Plasma) $ less config  
config: No such file or directory
charles@saga ~/.config/i3 (KDE5Plasma) $ less /home/charles/.config/i3/config  
/home/charles/.config/i3/config: Permission denied

You might also need your custom firejail profile.

it’s there
charles@saga ~ (KDE5Plasma) $ cat .config/firejail/less.local
noblacklist ${HOME}/*

Rename less.local to less.profile