[GH-ISSUE #887] restricted shell bug #601

Closed
opened 2026-05-05 06:15:39 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @dmio on GitHub (Nov 1, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/887

It seems, that after 0.9.34 version, firejail unable to execute commands with args thru restricted shell.
Examples:

# cat /etc/passwd|grep firejail
test:x:1001:1001::/home/test:/usr/bin/firejail
# su -l test -c "ls -l"
Autoselecting /bin/bash as shell
Command name #ls#
...
Running 'ls -l'  command through /bin/bash
execvp argument 0: /bin/bash
execvp argument 1: -c
execvp argument 2: 'ls -l' 
/bin/bash: ls -l: command not found
# firejail -c "date && date"
/bin/bash: date && date: command not found

Same with ssh:

% ssh test@localhost ls -l
/bin/bash: ls -l: command not found

Git over ssh:

% LANG=c git push origin
/bin/bash: git-receive-pack '/home/git/my/xyz.git': No such file or directory
fatal: Could not read from remote repository.
Originally created by @dmio on GitHub (Nov 1, 2016). Original GitHub issue: https://github.com/netblue30/firejail/issues/887 It seems, that after 0.9.34 version, firejail unable to execute commands with args thru restricted shell. Examples: ``` # cat /etc/passwd|grep firejail test:x:1001:1001::/home/test:/usr/bin/firejail # su -l test -c "ls -l" Autoselecting /bin/bash as shell Command name #ls# ... Running 'ls -l' command through /bin/bash execvp argument 0: /bin/bash execvp argument 1: -c execvp argument 2: 'ls -l' /bin/bash: ls -l: command not found # firejail -c "date && date" /bin/bash: date && date: command not found ``` Same with ssh: ``` % ssh test@localhost ls -l /bin/bash: ls -l: command not found ``` Git over ssh: ``` % LANG=c git push origin /bin/bash: git-receive-pack '/home/git/my/xyz.git': No such file or directory fatal: Could not read from remote repository. ```
gitea-mirror 2026-05-05 06:15:39 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@chtaylo2 commented on GitHub (Mar 1, 2018):

+1 for this issue. I'd like to use firejail for a remote kdump server, so being able to execute remote commands would be great. Thanks for the great work on this tool.

<!-- gh-comment-id:369480872 --> @chtaylo2 commented on GitHub (Mar 1, 2018): +1 for this issue. I'd like to use firejail for a remote kdump server, so being able to execute remote commands would be great. Thanks for the great work on this tool.
Author
Owner

@jsquyres commented on GitHub (Jun 2, 2021):

See #4326 for a possible solution.

<!-- gh-comment-id:853446094 --> @jsquyres commented on GitHub (Jun 2, 2021): See #4326 for a possible solution.
Author
Owner

@rusty-snake commented on GitHub (Jun 10, 2021):

This issue is fixed by #4326 as I understand.

<!-- gh-comment-id:858432520 --> @rusty-snake commented on GitHub (Jun 10, 2021): This issue is fixed by #4326 as I understand.
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#601
No description provided.