[GH-ISSUE #1464] Cannot execute file with .sh extension in /usr/bin #986

Closed
opened 2026-05-05 07:15:55 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @icasdri on GitHub (Aug 12, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1464

With a (completely) non-blacklisted /usr/bin:

  • a script with .sh extension (for instance /usr/bin/myscript.sh) with proper execute bit and shebang #!/bin/sh will fail to execute with Permission denied.
  • but the exact same script named without an .sh extension (for instance /usr/bin/myscript) will work just fine.

Unfortunately, there are some programs in /usr/bin like IntelliJ IDEA (/usr/bin/idea.sh) that have .sh extensions, and thus fail to start inside a firejail.

Originally created by @icasdri on GitHub (Aug 12, 2017). Original GitHub issue: https://github.com/netblue30/firejail/issues/1464 With a (completely) *non-blacklisted* `/usr/bin`: * a script with `.sh` extension (for instance `/usr/bin/myscript.sh`) with proper execute bit and shebang `#!/bin/sh` will **fail** to execute with `Permission denied`. * but the *exact same* script named without an `.sh` extension (for instance `/usr/bin/myscript`) will work just fine. Unfortunately, there are some programs in `/usr/bin` like `IntelliJ IDEA` (`/usr/bin/idea.sh`) that have `.sh` extensions, and thus fail to start inside a firejail.
Author
Owner

@SkewedZeppelin commented on GitHub (Aug 12, 2017):

This is fixed in master, see #1383

<!-- gh-comment-id:321956917 --> @SkewedZeppelin commented on GitHub (Aug 12, 2017): This is fixed in master, see #1383
Author
Owner

@icasdri commented on GitHub (Aug 12, 2017):

Ok. Thanks for the fix!

<!-- gh-comment-id:321957354 --> @icasdri commented on GitHub (Aug 12, 2017): Ok. Thanks for the fix!
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#986
No description provided.