[GH-ISSUE #595] Firejail needs root to display version(?!) #419

Closed
opened 2026-05-05 05:49:30 -06:00 by gitea-mirror · 7 comments
Owner

Originally created by @chiraag-nataraj on GitHub (Jun 25, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/595

Steps to reproduce:

  1. firejail bash
  2. firejail --version
    Instead of getting the version, I get
Error: cannot switch euid to root
Error: cannot switch euid to root
Error: cannot switch euid to root
Error: the sandbox is not setuid root
Originally created by @chiraag-nataraj on GitHub (Jun 25, 2016). Original GitHub issue: https://github.com/netblue30/firejail/issues/595 Steps to reproduce: 1) `firejail bash` 2) `firejail --version` Instead of getting the version, I get ``` Error: cannot switch euid to root Error: cannot switch euid to root Error: cannot switch euid to root Error: the sandbox is not setuid root ```
gitea-mirror 2026-05-05 05:49:30 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@netblue30 commented on GitHub (Jun 26, 2016):

Did you install it SUID?

$ ls -l /usr/bin/firejail
-rwsr-xr-x 1 root root 1338184 Jun 24 11:50 /usr/bin/firejail
<!-- gh-comment-id:228608668 --> @netblue30 commented on GitHub (Jun 26, 2016): Did you install it SUID? ``` $ ls -l /usr/bin/firejail -rwsr-xr-x 1 root root 1338184 Jun 24 11:50 /usr/bin/firejail ```
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 26, 2016):

$ls -lh /usr/bin/firejail
-rwsr-xr-x 1 65534 65534 295K Jun 14 19:20 /usr/bin/firejail

Yup. (This is within the jail, hence the different UID and GID).

I think I wasn't clear - this is within the jail (not outside).

<!-- gh-comment-id:228614345 --> @chiraag-nataraj commented on GitHub (Jun 26, 2016): ``` $ls -lh /usr/bin/firejail -rwsr-xr-x 1 65534 65534 295K Jun 14 19:20 /usr/bin/firejail ``` Yup. (This is within the jail, hence the different UID and GID). I think I wasn't clear - this is _within_ the jail (not outside).
Author
Owner

@netblue30 commented on GitHub (Jun 27, 2016):

Not a problem, the jail actually will prevent a new jail for starting - firejail is a SUID executable, and SUID executables are disabled.

<!-- gh-comment-id:228634022 --> @netblue30 commented on GitHub (Jun 27, 2016): Not a problem, the jail actually will prevent a new jail for starting - firejail is a SUID executable, and SUID executables are disabled.
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 27, 2016):

Huh...okay. I realized that, but it's interesting that it would have to set the UID and GID to root before it even did the argument parsing (which would tell it that it just has to display the version).

<!-- gh-comment-id:228635260 --> @chiraag-nataraj commented on GitHub (Jun 27, 2016): Huh...okay. I realized that, but it's interesting that it would have to set the UID and GID to root before it even did the argument parsing (which would tell it that it just has to display the version).
Author
Owner

@netblue30 commented on GitHub (Jun 27, 2016):

Good point! I'll have to fix it.

<!-- gh-comment-id:228635382 --> @netblue30 commented on GitHub (Jun 27, 2016): Good point! I'll have to fix it.
Author
Owner

@chiraag-nataraj commented on GitHub (Jun 27, 2016):

😄

<!-- gh-comment-id:228635878 --> @chiraag-nataraj commented on GitHub (Jun 27, 2016): :smile:
Author
Owner

@netblue30 commented on GitHub (Jun 28, 2016):

Fixed, thanks for the bug.

<!-- gh-comment-id:229074546 --> @netblue30 commented on GitHub (Jun 28, 2016): Fixed, thanks for the bug.
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#419
No description provided.