[GH-ISSUE #1801] The "less" command can't view files when run as root, using firejail. #1223

Closed
opened 2026-05-05 07:40:56 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @ThePythonicCow on GitHub (Mar 6, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1801

If I try to view a file, while root, using the firejailed "less" command, it either can't find the file to be viewed, or lacks permission to view it.

The firejailed "less" command works fine for me, when I am not su'd to root.

If the file to be viewed, using less as root, is some /var/log/example.log file, then the firejailed less command fails with EPERM Permission denied

If the file to be viewed, using less as root, is some file owned by an ordinary non-root user, such as /home/example_user/example.txt, then the firejailed less command fails ENOENT No such file or directory.

If I remove the /usr/local/bin/less symlink to firejail, then the "real" /usr/bin/less command runs and works fine.

I have only recently converted to Gentoo, and I have just started running firejail in this setup.

My Gentoo version: Gentoo Base System release 2.4.1
My less -V version: less 529 (PCRE regular expressions)
The "firejail --version": firejail version 0.9.50

Originally created by @ThePythonicCow on GitHub (Mar 6, 2018). Original GitHub issue: https://github.com/netblue30/firejail/issues/1801 If I try to view a file, while root, using the firejailed "less" command, it either can't find the file to be viewed, or lacks permission to view it. The firejailed "less" command works fine for me, when I am not su'd to root. If the file to be viewed, using less as root, is some /var/log/example.log file, then the firejailed less command fails with EPERM Permission denied If the file to be viewed, using less as root, is some file owned by an ordinary non-root user, such as /home/example_user/example.txt, then the firejailed less command fails ENOENT No such file or directory. If I remove the /usr/local/bin/less symlink to firejail, then the "real" /usr/bin/less command runs and works fine. I have only recently converted to Gentoo, and I have just started running firejail in this setup. **My Gentoo version**: Gentoo Base System release 2.4.1 **My less -V version**: less 529 (PCRE regular expressions) **The "firejail --version"**: firejail version 0.9.50
gitea-mirror 2026-05-05 07:40:56 -06:00
Author
Owner

@netblue30 commented on GitHub (Mar 6, 2018):

Let's close #1800 and #1801and move the discussion to https://github.com/netblue30/firejail/pull/1802 until we find a fix.

<!-- gh-comment-id:370828977 --> @netblue30 commented on GitHub (Mar 6, 2018): Let's close #1800 and #1801and move the discussion to https://github.com/netblue30/firejail/pull/1802 until we find a 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#1223
No description provided.