mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3448] --private-bin=something does not seem to work #2164
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#2164
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @heinrich5991 on GitHub (Jun 3, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3448
--private-bin=somethingdoes not seem to work for me.Bug and expected behavior
I expected
lsto execute given that I whitelisted it with--private-bin.No profile or disabling firejail
firejail --private-bin=ls --noprofile lsalso doesn't work.firejail --noprofile lsobviously works, so doesfirejail ls.ls) obviously also works.Reproduce
Steps to reproduce the behavior:
firejail --private-bin=ls lsexecvp: No such file or directoryEnvironment
fishis my default shell, but both setting theSHELLvariable to/bin/bashand executing from bash did not seem to help.No other programs interact with the affected program for the functionality.
Additional context
I figured out that the default Discord profile does not work for me due to the
private-bindirectives. I narrowed it down toprivate-binnot working in general for me. Might have something to do withfishbeing my default shell: #2934.Checklist
find / -name 'firejail' 2>/dev/null/fd firejailto locate profiles ie in/usr/local/etc/firejail/PROGRAM.profile)@rusty-snake commented on GitHub (Jun 3, 2020):
Can you try with bash.
Can you try adding
--shell=none:firejail --private-bin=ls --shell=none --noprofile lsWorks
firejail --private-bin=ls,fish --noprofile lsandfirejail --private-bin=ls --noprofile /bin/lsNOTE: Not having a shell inside the sandbox, but starting a program in a shell is expected to fail.
@heinrich5991 commented on GitHub (Jun 3, 2020):
After changing the shell to bash using
chsh -s /bin/bashand then logging in via SSH again:firejail --private-bin=ls --shell=none --noprofile lsworks.firejail --private-bin=ls,bash --noprofile lsworks if bash is my default shell.firejail --private-bin=ls,fish --noprofile lskinda works with a warning:@heinrich5991 commented on GitHub (Jun 3, 2020):
It's unexpected for me that firejail calls the shell btw.
@heinrich5991 commented on GitHub (Jun 4, 2020):
@rusty-snake commented on GitHub (Jun 4, 2020):
I'm probably endlessly saying it, but let me repeat it one more time: A not POSIX compatible login-shell is a bad Idea. Programs break badly, you need to debug strength issues and have a potential security-hole because of others escape rules. Guys, use bash as login-shell and set you favourite interactive-shell in your terminal-emulator/multiplexer.
@rusty-snake commented on GitHub (Jun 4, 2020):
Looks like
[is not a build-in of fish. Unfortunately you can't add it (#3381).@rusty-snake commented on GitHub (Jun 4, 2020):
@heinrich5991 commented on GitHub (Jun 4, 2020):
No, firejail is the first program for me that breaks under
fish. If it is related to fish that firejail breaks, that seems to be a firejail problem. I have been using fish for over a year as my login shell.I can't comment on the security holes because those aren't visible to users.
Note that the problem does not seem to be related to fish though, it also fails in bash (see https://github.com/netblue30/firejail/issues/3448#issuecomment-638467927).
Can you explain what benefit firejail gets by executing a shell with each command by default?
@rusty-snake commented on GitHub (Jun 4, 2020):
I've seen more program that assume bash as login-shell, and can only tell what IMHO the best is.
@rusty-snake commented on GitHub (Sep 1, 2020):
Closing here, we still have #3434.
@rusty-snake commented on GitHub (Jun 20, 2022):
shell nonebecomes default (#5196).@heinrich5991 commented on GitHub (Jun 21, 2022):
Nice! :)