[GH-ISSUE #2323] Firefox Private Window allowing access to home entire folder in Kubuntu 18.04 #1549

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

Originally created by @SuperSentient on GitHub (Dec 30, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2323

I just noticed that when Firefox is in a private window it allows access to the entire home folder. But this doesn't happen in a new/standard window, I'm using Firejail version 0.9.56. Using standard Firejail profile firejail firefox. But this doesn't happen with the Private Home profile.
Running Kubuntu 18.04.1

Originally created by @SuperSentient on GitHub (Dec 30, 2018). Original GitHub issue: https://github.com/netblue30/firejail/issues/2323 I just noticed that when Firefox is in a private window it allows access to the entire home folder. But this doesn't happen in a new/standard window, I'm using Firejail version 0.9.56. Using standard Firejail profile **firejail firefox**. But this doesn't happen with the Private Home profile. Running Kubuntu 18.04.1
gitea-mirror 2026-05-05 08:12:40 -06:00
Author
Owner

@SkewedZeppelin commented on GitHub (Dec 30, 2018):

I cannot reproduce. Exact command used to run along with some output? and also how are you determining that Firefox can access everything?

<!-- gh-comment-id:450593510 --> @SkewedZeppelin commented on GitHub (Dec 30, 2018): I cannot reproduce. Exact command used to run along with some output? and also how are you determining that Firefox can access everything?
Author
Owner

@SuperSentient commented on GitHub (Dec 31, 2018):

I cannot reproduce. Exact command used to run along with some output? and also how are you determining that Firefox can access everything?

When I try uploading a file to a website for example I can see the whole home folder. But I figured it out it happens when I right click over the panel icon for Firefox and chose either open in a new window or open in a new private window. But when I left click over the icon Firejail works normally. So right clicking either open in a new window or open in a new private window for some reason doesn't open Firefox in Firejail even though I have the icon configured to open Firefox in Firejail.

<!-- gh-comment-id:450596945 --> @SuperSentient commented on GitHub (Dec 31, 2018): > I cannot reproduce. Exact command used to run along with some output? and also how are you determining that Firefox can access everything? When I try uploading a file to a website for example I can see the whole home folder. But I figured it out it happens when I right click over the panel icon for Firefox and chose either open in a new window or open in a new private window. But when I left click over the icon Firejail works normally. So right clicking either open in a new window or open in a new private window for some reason doesn't open Firefox in Firejail even though I have the icon configured to open Firefox in Firejail.
Author
Owner

@rusty-snake commented on GitHub (Dec 31, 2018):

@SuperSentient which distro? which Desktop?

<!-- gh-comment-id:450641823 --> @rusty-snake commented on GitHub (Dec 31, 2018): @SuperSentient which distro? which Desktop?
Author
Owner

@SkewedZeppelin commented on GitHub (Dec 31, 2018):

Please try this:

sudo ln -s /usr/bin/firejail /usr/local/bin/firefox

then close out of all firefox instances
then start firefox through your launcher

then try to reproduce this issue

<!-- gh-comment-id:450653309 --> @SkewedZeppelin commented on GitHub (Dec 31, 2018): Please try this: ``` sudo ln -s /usr/bin/firejail /usr/local/bin/firefox ``` then close out of all firefox instances then start firefox through your launcher then try to reproduce this issue
Author
Owner

@SuperSentient commented on GitHub (Dec 31, 2018):

Please try this:

sudo ln -s /usr/bin/firejail /usr/local/bin/firefox

then close out of all firefox instances
then start firefox through your launcher

then try to reproduce this issue

Good thing I tried that command in Virtualbox because now I cant open Firefox outside of Firejail which is a problem for example if I want to export my Noscript's whitelist I cant export it to the desktop. :(

@ rusty-snake Its Kubuntu 18.04.1 KDE Plasma version 5.12.7 KDE Frameworks version 5.44.0 Qt version 5.9.5 Kernel version 4.15.0-43 generic.

<!-- gh-comment-id:450680870 --> @SuperSentient commented on GitHub (Dec 31, 2018): > Please try this: > > ``` > sudo ln -s /usr/bin/firejail /usr/local/bin/firefox > ``` > > then close out of all firefox instances > then start firefox through your launcher > > then try to reproduce this issue Good thing I tried that command in Virtualbox because now I cant open Firefox outside of Firejail which is a problem for example if I want to export my Noscript's whitelist I cant export it to the desktop. :( @ rusty-snake Its Kubuntu 18.04.1 KDE Plasma version 5.12.7 KDE Frameworks version 5.44.0 Qt version 5.9.5 Kernel version 4.15.0-43 generic.
Author
Owner

@Fred-Barclay commented on GitHub (Dec 31, 2018):

Good thing I tried that command in Virtualbox because now I cant open Firefox outside of Firejail which is a problem for example if I want to export my Noscript's whitelist I cant export it to the desktop. :(

But can you reproduce the issue after you've run this? 😉 Basically we're trying to figure out if the problem is really with firejail or if it's just that KDE doesn't launch your customised firejail firefox command when you right-click the icon to launch. I suspect the latter option. If that's the case, the only way that I know of to make sure firefox always launches inside firejail is to first run the command @SkewedZeppelin provided. From then on, firefox will be configured to always launch inside firejail.

To revert the command, just remove the symlink and you'll be good to go:
sudo rm /usr/local/bin/firefox
(It's the same principle as firecfg).

<!-- gh-comment-id:450692154 --> @Fred-Barclay commented on GitHub (Dec 31, 2018): > Good thing I tried that command in Virtualbox because now I cant open Firefox outside of Firejail which is a problem for example if I want to export my Noscript's whitelist I cant export it to the desktop. :( But can you reproduce the issue after you've run this? :wink: Basically we're trying to figure out if the problem is really with firejail or if it's just that KDE doesn't launch your customised `firejail firefox` command when you right-click the icon to launch. I suspect the latter option. If that's the case, the only way **that I know of** to make sure firefox always launches inside firejail is to first run the command @SkewedZeppelin provided. From then on, firefox will be configured to always launch inside firejail. To revert the command, just remove the symlink and you'll be good to go: `sudo rm /usr/local/bin/firefox` (It's the same principle as `firecfg`).
Author
Owner

@rusty-snake commented on GitHub (Jan 1, 2019):

[Desktop Entry]
…
Name=Firefox Web Browser
…
Exec=firefox %u
…
Actions=new-window;new-private-window;

[Desktop Action new-window]
Name=Open a New Window
…
Exec=firefox -new-window

[Desktop Action new-private-window]
Name=Open a New Private Window
…
Exec=firefox -private-window

@SuperSentient this is a shortened version of firefox.dektop, have you changed all three Exec lines or only the first one?

<!-- gh-comment-id:450721605 --> @rusty-snake commented on GitHub (Jan 1, 2019): ``` [Desktop Entry] … Name=Firefox Web Browser … Exec=firefox %u … Actions=new-window;new-private-window; [Desktop Action new-window] Name=Open a New Window … Exec=firefox -new-window [Desktop Action new-private-window] Name=Open a New Private Window … Exec=firefox -private-window ``` @SuperSentient this is a shortened version of `firefox.dektop`, have you changed all three `Exec` lines or only the first one?
Author
Owner

@SuperSentient commented on GitHub (Jan 2, 2019):

[Desktop Entry]
…
Name=Firefox Web Browser
…
Exec=firefox %u
…
Actions=new-window;new-private-window;

[Desktop Action new-window]
Name=Open a New Window
…
Exec=firefox -new-window

[Desktop Action new-private-window]
Name=Open a New Private Window
…
Exec=firefox -private-window

@SuperSentient this is a shortened version of firefox.dektop, have you changed all three Exec lines or only the first one?

I didn't make any changes to Firejail I simply installed it and configured the icons to either firejail firefox or firejail --private-home=.mozilla firefox

<!-- gh-comment-id:450771676 --> @SuperSentient commented on GitHub (Jan 2, 2019): > ``` > [Desktop Entry] > … > Name=Firefox Web Browser > … > Exec=firefox %u > … > Actions=new-window;new-private-window; > > [Desktop Action new-window] > Name=Open a New Window > … > Exec=firefox -new-window > > [Desktop Action new-private-window] > Name=Open a New Private Window > … > Exec=firefox -private-window > ``` > > @SuperSentient this is a shortened version of `firefox.dektop`, have you changed all three `Exec` lines or only the first one? I didn't make any changes to Firejail I simply installed it and configured the icons to either **firejail firefox** or **firejail --private-home=.mozilla firefox**
Author
Owner

@SkewedZeppelin commented on GitHub (Jan 2, 2019):

The recommended way to enable firejail for a program is through the symlink invocation feature. This is done by manually creating the symlink like shown above or by running firecfg --fix && sudo firecfg.
It is much more reliable and persistent compared to manually editing .desktop files/launchers/scripts.

If you really want to instead just edit the .desktop file:

cd ~/.local/share/applications;
mv firefox.desktop firefox.desktop.bak; #if you have an existing one
cp /usr/share/applications/firefox.desktop .;
sed -i 's/Exec=/Exec=firejail /' firefox.desktop; #include --private-home if you want
#optionally restart your DE
<!-- gh-comment-id:450774867 --> @SkewedZeppelin commented on GitHub (Jan 2, 2019): The recommended way to enable firejail for a program is through the symlink invocation feature. This is done by manually creating the symlink like shown above or by running `firecfg --fix && sudo firecfg`. It is much more reliable and persistent compared to manually editing .desktop files/launchers/scripts. If you really want to instead just edit the .desktop file: ```sh cd ~/.local/share/applications; mv firefox.desktop firefox.desktop.bak; #if you have an existing one cp /usr/share/applications/firefox.desktop .; sed -i 's/Exec=/Exec=firejail /' firefox.desktop; #include --private-home if you want #optionally restart your DE ```
Author
Owner

@SuperSentient commented on GitHub (Jan 9, 2019):

The recommended way to enable firejail for a program is through the symlink invocation feature. This is done by manually creating the symlink like shown above or by running firecfg --fix && sudo firecfg.
It is much more reliable and persistent compared to manually editing .desktop files/launchers/scripts.

If you really want to instead just edit the .desktop file:

cd ~/.local/share/applications;
mv firefox.desktop firefox.desktop.bak; #if you have an existing one
cp /usr/share/applications/firefox.desktop .;
sed -i 's/Exec=/Exec=firejail /' firefox.desktop; #include --private-home if you want
#optionally restart your DE

No thanks I'll just launch Firefox by left clicking it, its not really a major issue for me.

<!-- gh-comment-id:452552719 --> @SuperSentient commented on GitHub (Jan 9, 2019): > The recommended way to enable firejail for a program is through the symlink invocation feature. This is done by manually creating the symlink like shown above or by running `firecfg --fix && sudo firecfg`. > It is much more reliable and persistent compared to manually editing .desktop files/launchers/scripts. > > If you really want to instead just edit the .desktop file: > > ```shell > cd ~/.local/share/applications; > mv firefox.desktop firefox.desktop.bak; #if you have an existing one > cp /usr/share/applications/firefox.desktop .; > sed -i 's/Exec=/Exec=firejail /' firefox.desktop; #include --private-home if you want > #optionally restart your DE > ``` No thanks I'll just launch Firefox by left clicking it, its not really a major issue for me.
Author
Owner

@Fred-Barclay commented on GitHub (Jan 9, 2019):

Ok, closing then. Thanks! 😄

<!-- gh-comment-id:452566840 --> @Fred-Barclay commented on GitHub (Jan 9, 2019): Ok, closing then. Thanks! :smile:
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#1549
No description provided.