I just updated from Ubuntu 20.04 to 22.04 and it looks since then Firefox can't open a file. When I download a file from a website, I get the dialog box "Open with... System Handler (default)". I try that and it looks the file is downloaded but I can't open it or even access the folder when it was downloaded. I have Firefox 105.0.3 (64 bits) Mozilla Firefox Snap for Canonical-002 - 1.0
-
Can you give specific step by step instructions allowing others to reproduce your issue? – vanadium Oct 16 '22 at 18:58
-
1Switching from the snap to the apt version should fix such permission issues. https://askubuntu.com/questions/1399383/how-to-install-firefox-as-a-traditional-deb-package-without-snap-in-ubuntu-22/1404401#1404401 – Archisman Panigrahi Oct 17 '22 at 00:14
-
4Does this answer your question? How to install Firefox as a traditional deb package (without snap) in Ubuntu 22.04 (jammy) – Archisman Panigrahi Oct 17 '22 at 00:14
-
If you do not want to change Firefox to apt version you need to download the file to your home directory so Firefox can access it. – David Oct 17 '22 at 05:10
-
Thanks for the answers! Yes, I can download the file to a folder and then open it from there. I read that there have been some issues with snap Firefox. Do you really advice me to install it with deb package and forget snap or maybe think that these issues will be resolved in a near future? – Sergi Oct 17 '22 at 20:38
3 Answers
Likely your firefox is installed with snap and it doesn't have privileges, simplest solution is to reinstall it with Ubuntu package from mozilla repository.
This is what worked for me:
- Remove snap firefox installation:
sudo snap remove firefox
- Add mozilla repo
sudo add-apt-repository ppa:mozillateam/ppa
3.Change priority, so ubuntu will use repo instead of snap
echo '
Package: *
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 1001
' | sudo tee /etc/apt/preferences.d/mozilla-firefox
- Install Firefox:
sudo apt install firefox
These steps were taken from there: https://fosspost.org/how-to-install-firefox-as-a-deb-package-on-ubuntu-22-04/

- 31
snap packages are used to improve security in several different ways. The parts that help:
- a snap package gets installed in its own environment (a
chroot
environment) - snap dependencies have to be installed within its environment (avoid using an invalid / incompatible / unsafe version of a package)
- access to files on your system from a snap package is controlled by
apparmor
so you have several solutions:
one is to find an up to date version of the .deb but Ubuntu was saying that they would stop producing those... yet it looks like there are PPAs with the latest
save the files in different locations to be able to open them; it should work from your folders (under your
/home/<login>
). This may still fail if apparmor prevents firefox from starting other binaries.edit the apparmor settings to allow firefox to do this and/or that; the apparmor files are not in the snap since they are required for the main host apparmor system; the ones for firefox are found here:
$ ls /var/lib/snapd/apparmor/profiles/snap.firefox.* /var/lib/snapd/apparmor/profiles/snap.firefox.firefox /var/lib/snapd/apparmor/profiles/snap.firefox.geckodriver /var/lib/snapd/apparmor/profiles/snap.firefox.hook.configure /var/lib/snapd/apparmor/profiles/snap.firefox.hook.connect-plug-host-hunspell /var/lib/snapd/apparmor/profiles/snap.firefox.hook.disconnect-plug-host-hunspell /var/lib/snapd/apparmor/profiles/snap.firefox.hook.post-refresh
You need to edit
/var/lib/snapd/apparmor/profiles/snap.firefox.firefox
and make the changes to make it all work. For example, to allow execution of binaries under~/bin
, you could add something like:@{HOME}/bin rx, # allow Read & eXecute under /home/<login>/bin
Once done with the edits, run:
sudo apparmor_parser -r /var/lib/snapd/apparmor/profiles/snap.firefox.firefox
then restart firefox.
As for the change itself, it depends on what you are trying to do. To access a file in a directory, that directory needs to be allowed. The type of access is defined by a set of letters.
Note 1: The changes you make are going to be overwritten each time the snap is refreshed. So make sure to make a clear copy of you changes so you can re-apply them. Outside of that side problem, it's probably the best solution.
Note 2: The changes to
snap.firefox.firefox
are for all users on your machine. If you have multiple users, you may want to reconsider. At the same time, installing the .deb would allow anyone to (nearly) do anything as before without any real protection.

- 2,707
Maybe this can help you:
Try to install [Firefox without snap].1
If that does not work, try this:
If any of the following settings are in bold text, reset their values. To reset a value, click the Delete Fx71aboutconfig-DeleteButton
or Reset Fx71aboutconfig-ResetButton
button, depending on the preference:
browser.download.dir
browser.download.downloadDir
browser.download.folderList
browser.download.lastDir
browser.download.useDownloadDir
For me browser.download.useDownloadDir
had "false" value. Reset button change to true and everything is working now.
See also https://support.mozilla.org/en-US/kb/cant-download-or-save-files

- 1,079