[GH-ISSUE #3119] Strange pathname behaviour #1956

Closed
opened 2026-05-05 08:37:14 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @adrianlshaw on GitHub (Jan 3, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3119

I've been trying to sandbox an application that looks for a file in ${HOME}.local/foobar/. Without any sandbox it finds the file.

But within firejail (private-etc enabled in the profile and file path whitelisted) the application itself says it can't find the file in /.local/foobar/. Yes, that's a leading slash. It genuinely has no business looking for filenames in the root directory, so somewhere there must be a bug that misses out the "home/username" part of the path.

I'm unsure if this is a bug in the application or with firejail. Am I missing something obvious?

Originally created by @adrianlshaw on GitHub (Jan 3, 2020). Original GitHub issue: https://github.com/netblue30/firejail/issues/3119 I've been trying to sandbox an application that looks for a file in ``${HOME}.local/foobar/``. Without any sandbox it finds the file. But within firejail (private-etc enabled in the profile and file path whitelisted) the application itself says it can't find the file in `/.local/foobar/`. Yes, that's a leading slash. It genuinely has no business looking for filenames in the root directory, so somewhere there must be a bug that misses out the "home/username" part of the path. I'm unsure if this is a bug in the application or with firejail. Am I missing something obvious?
Author
Owner

@rusty-snake commented on GitHub (Jan 3, 2020):

Which applications? Also with --noprofile?

I'm unsure if this is a bug in the application or with firejail.

Probably a bug the applications that occurs inside firejail because of some environment changes.

<!-- gh-comment-id:570715600 --> @rusty-snake commented on GitHub (Jan 3, 2020): Which applications? Also with --noprofile? > I'm unsure if this is a bug in the application or with firejail. Probably a bug the applications that occurs inside firejail because of some environment changes.
Author
Owner

@adrianlshaw commented on GitHub (Jan 4, 2020):

It's the "barrier" program. I've been further hardening it by giving its own private etc and limiting access to the home directory. I have the rules ready but this issue is stopping progress and it's a peculiar one.

Adding a dodgy symlink to the root filesystem sadly does make it work, but isn't a good solution. Firejail isn't (and probably shouldn't be) in the business of setting up symlinks in private filesystems. Guess the next step is for me to look through the barrier source code.

<!-- gh-comment-id:570782062 --> @adrianlshaw commented on GitHub (Jan 4, 2020): It's the "barrier" program. I've been further hardening it by giving its own private etc and limiting access to the home directory. I have the rules ready but this issue is stopping progress and it's a peculiar one. Adding a dodgy symlink to the root filesystem sadly does make it work, but isn't a good solution. Firejail isn't (and probably shouldn't be) in the business of setting up symlinks in private filesystems. Guess the next step is for me to look through the barrier source code.
Author
Owner

@rusty-snake commented on GitHub (Feb 10, 2020):

still an issue?

<!-- gh-comment-id:584050403 --> @rusty-snake commented on GitHub (Feb 10, 2020): still an issue?
Author
Owner

@adrianlshaw commented on GitHub (Feb 11, 2020):

Not made any progress. Closing for now until I can confirm if it's a firejail issue.

<!-- gh-comment-id:584539222 --> @adrianlshaw commented on GitHub (Feb 11, 2020): Not made any progress. Closing for now until I can confirm if it's a firejail issue.
Author
Owner

@Vincent43 commented on GitHub (Feb 11, 2020):

Did you tried without private-etc and/or whitelisted home or even with --noprofile?

<!-- gh-comment-id:584817438 --> @Vincent43 commented on GitHub (Feb 11, 2020): Did you tried without `private-etc` and/or whitelisted home or even with `--noprofile`?
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#1956
No description provided.