[GH-ISSUE #1729] Frequent permission errors with firejail #1169

Closed
opened 2026-05-05 07:34:52 -06:00 by gitea-mirror · 20 comments
Owner

Originally created by @ghost on GitHub (Jan 13, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1729

While working with firejail I often see my apps(steam, wine stuff) to crash due to permission errors. From the outside I own the files but when I enter the sandbox with bash I can see that a lot of files and folders randomly are owned by 'root' or 'nobody'. I've never ran firejail with root or changed the owner of these containers. This is a fatal error because I can't change the owner from the inside so, I need to delete the files.
I've seen the errors happening from 0.9.44 to 0.9.52 on arch and manjaro too.

Originally created by @ghost on GitHub (Jan 13, 2018). Original GitHub issue: https://github.com/netblue30/firejail/issues/1729 While working with firejail I often see my apps(steam, wine stuff) to crash due to permission errors. From the outside I own the files but when I enter the sandbox with bash I can see that a lot of files and folders randomly are owned by 'root' or 'nobody'. I've never ran firejail with root or changed the owner of these containers. This is a fatal error because I can't change the owner from the inside so, I need to delete the files. I've seen the errors happening from 0.9.44 to 0.9.52 on arch and manjaro too.
Author
Owner

@chiraag-nataraj commented on GitHub (Jan 13, 2018):

Can you give a minimum working example? When I try firejail bash, I get put back in my home directory with all of the files owned by me. When I try firejail --private-home=Downloads (as an example), I get back a new home directory with all of the files owned by me.

What profile(s) do you see this with? Maybe there's something in common with all of them that will help us figure out what's going on.

<!-- gh-comment-id:357451800 --> @chiraag-nataraj commented on GitHub (Jan 13, 2018): Can you give a minimum working example? When I try `firejail bash`, I get put back in my home directory with all of the files owned by me. When I try `firejail --private-home=Downloads` (as an example), I get back a new home directory with all of the files owned by me. What profile(s) do you see this with? Maybe there's something in common with all of them that will help us figure out what's going on.
Author
Owner

@ghost commented on GitHub (Jan 13, 2018):

This won't happen on first try! firejail does work properly for me most of the time. I'm using steam and steam+wine in firejail and this is a once-in-a-month issue. I don't know what triggers it.

<!-- gh-comment-id:357452012 --> @ghost commented on GitHub (Jan 13, 2018): This won't happen on first try! firejail does work properly for me most of the time. I'm using steam and steam+wine in firejail and this is a once-in-a-month issue. I don't know what triggers it.
Author
Owner

@chiraag-nataraj commented on GitHub (Jan 13, 2018):

Hmm, darn. And you only see this in one profile? Or is that the only profile you (regularly) use?

<!-- gh-comment-id:357452117 --> @chiraag-nataraj commented on GitHub (Jan 13, 2018): Hmm, darn. And you only see this in one profile? Or is that the only profile you (regularly) use?
Author
Owner

@ghost commented on GitHub (Jan 13, 2018):

No, I've had this happen with multiple profiles(folders) with the steam and wine profiles. I usually need to delete most of the files because I can't use them anyway.

<!-- gh-comment-id:357452246 --> @ghost commented on GitHub (Jan 13, 2018): No, I've had this happen with multiple profiles(folders) with the steam and wine profiles. I usually need to delete most of the files because I can't use them anyway.
Author
Owner

@chiraag-nataraj commented on GitHub (Jan 13, 2018):

No, I've had this happen with multiple profiles(folders) with the steam and wine profiles.

I see. To clarify, the first "profiles" ("multiple profiles") refers to Steam profiles, right? (I don't really use Steam, so I have no idea how the terminology works).

I usually need to delete most of the files because I can't use them anyway.

What do you mean? Which files? The profiles firejail installs?

<!-- gh-comment-id:357452663 --> @chiraag-nataraj commented on GitHub (Jan 13, 2018): > No, I've had this happen with multiple profiles(folders) with the steam and wine profiles. I see. To clarify, the first "profiles" ("multiple profiles") refers to _Steam_ profiles, right? (I don't really use Steam, so I have no idea how the terminology works). > I usually need to delete most of the files because I can't use them anyway. What do you mean? Which files? The profiles firejail installs?
Author
Owner

@ghost commented on GitHub (Jan 13, 2018):

This won't happen on first try! firejail does work properly for me most of the time. I'm using steam and steam+wine in firejail and this is a once-in-a-month issue. I don't know what triggers it.

<!-- gh-comment-id:357452681 --> @ghost commented on GitHub (Jan 13, 2018): This won't happen on first try! firejail does work properly for me most of the time. I'm using steam and steam+wine in firejail and this is a once-in-a-month issue. I don't know what triggers it.
Author
Owner

@Fred-Barclay commented on GitHub (Jan 13, 2018):

Do you ever do something like sudo steam or sudo wine? (Or sudo firejail steam or sudo firejail wine, for that matter?)

<!-- gh-comment-id:357452822 --> @Fred-Barclay commented on GitHub (Jan 13, 2018): Do you ever do something like `sudo steam` or `sudo wine`? (Or `sudo firejail steam` or `sudo firejail wine`, for that matter?)
Author
Owner

@ghost commented on GitHub (Jan 13, 2018):

@chiraag-nataraj by profile folder I mean I use steam like this: firejail --private=~/.apps/Steam steam and wine+steam like this: firejail --private=~/.apps/Wine wine ".wine/dosdevices/c:/Program Files/Steam/Steam.exe". So the profiles are folders containing 'faked' home folders.

<!-- gh-comment-id:357452862 --> @ghost commented on GitHub (Jan 13, 2018): @chiraag-nataraj by profile folder I mean I use steam like this: `firejail --private=~/.apps/Steam steam` and wine+steam like this: `firejail --private=~/.apps/Wine wine ".wine/dosdevices/c:/Program Files/Steam/Steam.exe"`. So the profiles are folders containing 'faked' home folders.
Author
Owner

@chiraag-nataraj commented on GitHub (Jan 13, 2018):

@trialism Ah okay, that makes more sense. Which files get weird permissions? The files in those folders? Other random files?

<!-- gh-comment-id:357452919 --> @chiraag-nataraj commented on GitHub (Jan 13, 2018): @trialism Ah okay, that makes more sense. Which files get weird permissions? The files in those folders? Other random files?
Author
Owner

@ghost commented on GitHub (Jan 13, 2018):

@Fred-Barclay never, I don't use sudo and I only use the root account with pacman and to edit files which require a privilege. I always run firejail with the desktop icons, unless it doesn't start then I start a new terminal for debugging.

<!-- gh-comment-id:357452983 --> @ghost commented on GitHub (Jan 13, 2018): @Fred-Barclay never, I don't use sudo and I only use the root account with pacman and to edit files which require a privilege. I always run firejail with the desktop icons, unless it doesn't start then I start a new terminal for debugging.
Author
Owner

@ghost commented on GitHub (Jan 13, 2018):

@chiraag-nataraj it's random I guess. For example with this case: .bash_history, .nv, .wine and the parent dir .. are owned by 'nobody' and the rest is on my user.

<!-- gh-comment-id:357453133 --> @ghost commented on GitHub (Jan 13, 2018): @chiraag-nataraj it's random I guess. For example with this case: `.bash_history`, `.nv`, `.wine` and the parent dir `..` are owned by 'nobody' and the rest is on my user.
Author
Owner

@chiraag-nataraj commented on GitHub (Jan 13, 2018):

So the parent dir being owned by 'nobody' makes sense. But the rest does not. @netblue30, any idea why this might happen?

<!-- gh-comment-id:357453409 --> @chiraag-nataraj commented on GitHub (Jan 13, 2018): So the parent dir being owned by 'nobody' makes sense. But the rest does not. @netblue30, any idea why this might happen?
Author
Owner

@chiraag-nataraj commented on GitHub (Sep 28, 2018):

@trialism Is this still an issue for you?

<!-- gh-comment-id:425567141 --> @chiraag-nataraj commented on GitHub (Sep 28, 2018): @trialism Is this still an issue for you?
Author
Owner

@ghost commented on GitHub (Oct 4, 2018):

@chiraag-nataraj I don't use firejail anymore.

<!-- gh-comment-id:427002735 --> @ghost commented on GitHub (Oct 4, 2018): @chiraag-nataraj I don't use firejail anymore.
Author
Owner

@jcaesar commented on GitHub (Apr 14, 2019):

It's still an issue for me. I can reproduce it by running firejail --private=$HOME/.bla, then running weechat in there, exiting weechat and the shell in the jail, and then entering the jail again.

@chiraag-nataraj Can I ask you to reopen this?

([Edit:] It is possible that my problem is a different one / lack of understanding of the docs. I've moved the .weechat directory in the private directory to a different name and the permission was fixed.)

<!-- gh-comment-id:482986960 --> @jcaesar commented on GitHub (Apr 14, 2019): It's still an issue for me. I can reproduce it by running `firejail --private=$HOME/.bla`, then running weechat in there, exiting weechat and the shell in the jail, and then entering the jail again. @chiraag-nataraj Can I ask you to reopen this? ([Edit:] It is possible that my problem is a different one / lack of understanding of the docs. I've moved the .weechat directory in the private directory to a different name and the permission was fixed.)
Author
Owner

@rusty-snake commented on GitHub (Apr 14, 2019):

Can reproduce with e.g ghostwriter.
$ normal shell
% shell in FJ

$ mkdir t
$ firejail --private=$HOME/t
% ghostwriter
% ls -l .config
drwxr-xr-x MYUSER … ghostwriter
$ ls -l .config
drwxr-xr-x MYUSER … ghostwriter
$ firejail --private=$HOME/t
% ls -l .config
dr-------- nobody  nobody  … ghostwriter
$ firejail --private=$HOME/t --noprofile
% ls -l .config
drwxr-xr-x MYUSER … ghostwriter
$ firejail --private=$HOME/t --profile=/etc/firejail/disable-programs.inc
% ls -l .config
dr-------- root  root … ghostwriter

@jcaesar also with firejail --private=$HOME/.bla --noprofile?

It looks like only files that have been blacklisted (in disable-common.inc or disable-programs.inc) are affected. To fix, use --noblacklist or for example with weechat firejail --private=$HOME/.bla --profile=/etc/firejail/weechat.profile.

<!-- gh-comment-id:482992311 --> @rusty-snake commented on GitHub (Apr 14, 2019): Can reproduce with e.g ghostwriter. $ normal shell % shell in FJ ``` $ mkdir t $ firejail --private=$HOME/t % ghostwriter % ls -l .config drwxr-xr-x MYUSER … ghostwriter $ ls -l .config drwxr-xr-x MYUSER … ghostwriter $ firejail --private=$HOME/t % ls -l .config dr-------- nobody nobody … ghostwriter $ firejail --private=$HOME/t --noprofile % ls -l .config drwxr-xr-x MYUSER … ghostwriter $ firejail --private=$HOME/t --profile=/etc/firejail/disable-programs.inc % ls -l .config dr-------- root root … ghostwriter ``` @jcaesar also with `firejail --private=$HOME/.bla --noprofile`? It looks like only files that have been blacklisted (in `disable-common.inc` or `disable-programs.inc`) are affected. To fix, use `--noblacklist` or for example with weechat `firejail --private=$HOME/.bla --profile=/etc/firejail/weechat.profile`.
Author
Owner

@jcaesar commented on GitHub (Apr 14, 2019):

@rusty-snake Using the weechat profile indeed fixes the permission. (My firejail has no --noblacklist.) So maybe it's a different bug than the one @trialism saw.

<!-- gh-comment-id:482993084 --> @jcaesar commented on GitHub (Apr 14, 2019): @rusty-snake Using the weechat profile indeed fixes the permission. (My firejail has no `--noblacklist`.) So maybe it's a different bug than the one @trialism saw.
Author
Owner

@rusty-snake commented on GitHub (Apr 14, 2019):

@jcaesar I think your FJ has --noblacklist, but maybe we'll just talk a little bit past it, I meant that you --noblacklist=PATH (where PATH are the files with permission error / See man firejail for --noblacklist).

<!-- gh-comment-id:482995352 --> @rusty-snake commented on GitHub (Apr 14, 2019): @jcaesar I think your FJ has `--noblacklist`, but maybe we'll just talk a little bit past it, I meant that you `--noblacklist=PATH` (where PATH are the files with permission error / See man firejail for --noblacklist).
Author
Owner

@rusty-snake commented on GitHub (Apr 14, 2019):

So maybe it's a different bug than the one @trialism saw.

Because of the nobody and root this sound for me it sounds like blacklisting to me.
@jcaesar if it was only that :) I would close again.

<!-- gh-comment-id:482999475 --> @rusty-snake commented on GitHub (Apr 14, 2019): > So maybe it's a different bug than the one @trialism saw. Because of the `nobody` and `root` this sound for me it sounds like blacklisting to me. @jcaesar if it was only that :) I would close again.
Author
Owner

@jcaesar commented on GitHub (Apr 15, 2019):

I think your FJ has --noblacklist

Ah, the error message confused me.

$ firejail --noblacklist
Error: invalid --noblacklist command line option
$ firejail --thisreallydoesntexist
Error: invalid --thisreallydoesntexist command line option

So yeah, please close.

<!-- gh-comment-id:483100763 --> @jcaesar commented on GitHub (Apr 15, 2019): >I think your FJ has --noblacklist Ah, the error message confused me. ``` $ firejail --noblacklist Error: invalid --noblacklist command line option $ firejail --thisreallydoesntexist Error: invalid --thisreallydoesntexist command line option ``` So yeah, please close.
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#1169
No description provided.