[GH-ISSUE #3173] Directory read-only even after noblacklist/whitelist #1989

Closed
opened 2026-05-05 08:39:12 -06:00 by gitea-mirror · 9 comments
Owner

Originally created by @q3cpma on GitHub (Jan 20, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3173

Hello,

I'm trying to use emacs in qutebrowser, and to that end, I call qutebrowser that way:

exec firejail \
    --noblacklist=~/.config/mpv \
    --noblacklist=~/.emacs.d \
    --whitelist=~/.config/mpv \
    --whitelist=~/.emacs.d \
    --nodbus \
    qutebrowser "$@"

Everything works well until I try to close emacs, where it tells me that ~/.emacs.d/history is read-only. Using an eshell, I can't even touch a file inside ~/.emacs.d (I get /usr/bin/touch: cannot touch 'a': Read-only file system), but I can in my HOME. I tried adding a --read-write=~/.emacs.d to no avail.
What is even stranger is that ~/.config/mpv isn't RO.

This is on Gentoo with firejail 0.9.62

Originally created by @q3cpma on GitHub (Jan 20, 2020). Original GitHub issue: https://github.com/netblue30/firejail/issues/3173 Hello, I'm trying to use emacs in qutebrowser, and to that end, I call qutebrowser that way: ``` exec firejail \ --noblacklist=~/.config/mpv \ --noblacklist=~/.emacs.d \ --whitelist=~/.config/mpv \ --whitelist=~/.emacs.d \ --nodbus \ qutebrowser "$@" ``` Everything works well until I try to close emacs, where it tells me that `~/.emacs.d/history` is read-only. Using an eshell, I can't even touch a file inside `~/.emacs.d` (I get `/usr/bin/touch: cannot touch 'a': Read-only file system`), but I can in my HOME. I tried adding a `--read-write=~/.emacs.d` to no avail. What is even stranger is that `~/.config/mpv` isn't RO. This is on Gentoo with firejail 0.9.62
gitea-mirror 2026-05-05 08:39:12 -06:00
Author
Owner

@reinerh commented on GitHub (Jan 20, 2020):

The qutebrowser profile includes disable-common.inc, which has this line:

read-only ${HOME}/.emacs.d

Does it work if you call it with --ignore='read-only ${HOME}/.emacs.d'?

<!-- gh-comment-id:576397944 --> @reinerh commented on GitHub (Jan 20, 2020): The qutebrowser profile includes disable-common.inc, which has this line: ``` read-only ${HOME}/.emacs.d ``` Does it work if you call it with `--ignore='read-only ${HOME}/.emacs.d'`?
Author
Owner

@q3cpma commented on GitHub (Jan 20, 2020):

It does, thanks. Strange that I was the first to be hit by this.

<!-- gh-comment-id:576406774 --> @q3cpma commented on GitHub (Jan 20, 2020): It does, thanks. Strange that I was the first to be hit by this.
Author
Owner

@reinerh commented on GitHub (Jan 20, 2020):

I can imagine the number of users of qutebrowser AND emacs AND firejail is quite small. :-)

<!-- gh-comment-id:576407530 --> @reinerh commented on GitHub (Jan 20, 2020): I can imagine the number of users of qutebrowser AND emacs AND firejail is quite small. :-)
Author
Owner

@q3cpma commented on GitHub (Jan 20, 2020):

Well, it work on the command line, but not in the profile. And ideally, I don't want the history to be overwritten, but I don't know how to do it.

<!-- gh-comment-id:576408599 --> @q3cpma commented on GitHub (Jan 20, 2020): Well, it work on the command line, but not in the profile. And ideally, I don't want the history to be overwritten, but I don't know how to do it.
Author
Owner

@reinerh commented on GitHub (Jan 20, 2020):

Adding ignore read-only ${HOME}/.emacs.d into the profile does not work?

<!-- gh-comment-id:576409081 --> @reinerh commented on GitHub (Jan 20, 2020): Adding `ignore read-only ${HOME}/.emacs.d` into the profile does not work?
Author
Owner

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

Adding ignore read-only ${HOME}/.emacs.d before read-only ${HOME}/.emacs.d or read-write ${HOME}/.emacs.d after read-only ${HOME}/.emacs.d in the profile works.

To get this ordering on the command line you need to use --profile:

firejail '--noblacklist=${HOME}/.emacs.d' --profile=qutebrowser '--read-write=${HOME}/.emacs.d' qutebrowser
<!-- gh-comment-id:576415033 --> @rusty-snake commented on GitHub (Jan 20, 2020): Adding `ignore read-only ${HOME}/.emacs.d` **before** `read-only ${HOME}/.emacs.d` or `read-write ${HOME}/.emacs.d` **after** `read-only ${HOME}/.emacs.d` in the profile works. To get this ordering on the command line you need to use `--profile`: firejail '--noblacklist=${HOME}/.emacs.d' --profile=qutebrowser '--read-write=${HOME}/.emacs.d' qutebrowser
Author
Owner

@q3cpma commented on GitHub (Jan 20, 2020):

Indeed, it works well, but my original goal was to make it read-write while not merging back the changes. Something like --private for ~/.emacs.d, basically.
For now, I can live with a shared history, though.

<!-- gh-comment-id:576421127 --> @q3cpma commented on GitHub (Jan 20, 2020): Indeed, it works well, but my original goal was to make it read-write while not merging back the changes. Something like --private for ~/.emacs.d, basically. For now, I can live with a shared history, though.
Author
Owner

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

Maybe emacs supports it to places the history file in a temp-dir such as /tmp (with private-tmp) or ~/.cache (with private-cache).

<!-- gh-comment-id:576423170 --> @rusty-snake commented on GitHub (Jan 20, 2020): Maybe emacs supports it to places the history file in a temp-dir such as `/tmp` (with `private-tmp`) or `~/.cache` (with `private-cache`).
Author
Owner

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

I'm closing here due to inactivity, please fell free to reopen if you have more questions.

<!-- gh-comment-id:584060240 --> @rusty-snake commented on GitHub (Feb 10, 2020): I'm closing here due to inactivity, please fell free to reopen if you have more questions.
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#1989
No description provided.