[FIX] Firejail –private can’t launch .sh file in home directory

Question

I can create a bash script, then launch it using firejail with the private option :

[email protected]:~$ echo "echo success" > /media/phil/Stockage/firejailtest.sh; chmod +x /media/phil/Stockage/firejailtest.sh 
[email protected]:~$ firejail --noprofile --private /media/phil/Stockage/firejailtest.sh 
Parent pid 117110, child pid 117111
Child process initialized in 8.67 ms
success

Parent is shutting down, bye...

Which works fine.

However, if my script is in my home directory, or any folder in the home directory, the above will fail :

[email protected]:~$ echo "echo success" > /home/phil/firejailtest.sh; chmod +x /home/phil/firejailtest.sh 
[email protected]:~$ firejail --noprofile --private /home/phil/firejailtest.sh 
Parent pid 117357, child pid 117358
Child process initialized in 8.73 ms
/bin/bash: ligne 1: /home/phil/firejailtest.sh: No such file or directory

Parent is shutting down, bye...

How do I launch a script or program within my home directory, with firejail, using “private” to ensure no modification is made to any of my files?

Click Here to see answer

0
payam 1 week 2022-09-22T12:45:57+00:00 0 Answers 3 views

Leave an answer

By answering, you agree to the Terms of Service and Privacy Policy.