mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1817] Error running ssh commands with arguments #1236
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#1236
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 @chtaylo2 on GitHub (Mar 16, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1817
This might have been on the radar a couple years back: https://github.com/netblue30/firejail/issues/719
I'm trying to allow ssh login w/ a firejail shell and run commands with arguments.
ie.: mkdir -p /var/crash
Both of these are not working:
ssh test@0 "mkdir -p /var/crash"
firejail -c "mkdir -p /var/crash"
Is there any suggested work arounds for this?
@netblue30 commented on GitHub (Mar 25, 2018):
Just to understand the problem. I have user test set with /usr/bin/firejail shell in /etc/passwd. I try to:
In my case it does nothing after login, just sits there. Is this your setup?
@chtaylo2 commented on GitHub (Mar 26, 2018):
I have the same setup with /usr/bin/firejail as the shell in /etc/passwd. However, on ssh login, I get:
"/bin/bash: mkdir -p ~/crash: No such file or directory"
If i run something like "uname" I get a valid response. It's only running commands with arguments.
@chiraag-nataraj commented on GitHub (Mar 29, 2018):
Try without the quotes.
firejail -c mkdir -p ~/crashworked just fine for me right here (note thatfirejail -c mkdir -p /var/crashgave memkdir: cannot create directory ‘/var/crash’: Read-only file systemas expected).@chiraag-nataraj commented on GitHub (Mar 29, 2018):
If there is a potential ambiguity, you can use
firejail -c -- program [args]to ensure all other arguments are passed to the program.@chtaylo2 commented on GitHub (Mar 30, 2018):
You're correct on the quotes with -c. It works once you remove the quotes.
However, doing this through an SSH session it does fail. Below is a snippet:
@chiraag-nataraj commented on GitHub (Mar 30, 2018):
Hmmm...I tried running
*chiraag@chiraag@14:05:+31%:~ $ ssh -qv localhost /usr/bin/firejail touch /tmp/testand it worked:
I didn't directly test the case where firejail is my shell, but wouldn't this effectively be what it runs? If not, this should hopefully help bisect the problem.
@chtaylo2 commented on GitHub (Mar 30, 2018):
Agreed. I just ran with a different user, with /bin/bash as the shell and it worked.
So looks to be something with how it interprets commands passed over SSH.
@dmio commented on GitHub (May 21, 2018):
It's similar to https://github.com/netblue30/firejail/issues/887
@chtaylo2 commented on GitHub (Aug 9, 2018):
Any chance on getting this fixed?
@chiraag-nataraj commented on GitHub (Aug 12, 2018):
I'm going to mess around with my Debian VM to figure out what's going on and if I can replicate.
@Gimly86 commented on GitHub (Aug 22, 2018):
Hello,
Same problem here, in remote SSH access or in local access the arguments not working :
Firejail version : 0.9.56~rc1-1
O/S : Debian 9.4
Kernel : 4.9.0-6-amd64 (Debian)
Thanks in advance for your next fix !
@chiraag-nataraj commented on GitHub (Aug 22, 2018):
Yeah, this is definitely a bug (I just replicated in my VM). Probably related to #1644 as well.
@chiraag-nataraj commented on GitHub (Aug 22, 2018):
I'm actually getting a hang when I try to actually run a program, and
--debugisn't working as an argument. There's something really wrong going on with argument parsing whenfirejailis used as the shell.@chiraag-nataraj commented on GitHub (Aug 22, 2018):
Shit. I see what's happening. The problem seems to be that since
argc!= 1, login_shell is never set to1, which breaks a ton of things.@chiraag-nataraj commented on GitHub (Sep 28, 2018):
@netblue30 We should probably look into this.
firejail-as-shell seems to be pretty broken currently (unless this was fixed in 0.9.56... @chtaylo2?)@chtaylo2 commented on GitHub (Oct 16, 2018):
@chiraag-nataraj @netblue30 - Hey, I checked the new version and it doesn't fix the above issue. Same thing is happening.
Thanks
@Gimly86 commented on GitHub (Nov 27, 2018):
Hello dev team's,
Any news for this issue ?
Thank you :)
@thsharp commented on GitHub (May 1, 2019):
Even with the recent updates to the repo, I'm still seeing this issue.
Is there a plan for getting this fixed?
Thanks!
@sgoundla commented on GitHub (Nov 26, 2019):
Hello... is there any update/plan this getting fixed? Thanks.
@hiteshrp commented on GitHub (Jul 24, 2020):
Well it's more than 6 months since last comment. Any update on this issue? When will fix be available?
@jsquyres commented on GitHub (Jun 2, 2021):
See #4326 for a possible solution.
@rusty-snake commented on GitHub (Jun 10, 2021):
This issue is fixed by #4326 as I understand.