Grant a Flatpak app access to files it says do not exist
Every command and identifier in this record checks out against current upstream documentation, so only the danger needed work. Confirmed from https://github.com/flatpak/flatpak/blob/main/doc/flatpak-override.xml that FILESYSTEM accepts home, xdg-download, an absolute path such as /mnt/data and a homedir-relative path like ~/dir, that :ro is a valid suffix, and that --reset and --show are real options, so the fix and the verify line are correct current syntax. Confirmed --show-permissions from https://github.com/flatpak/flatpak/blob/main/doc/flatpak-info.xml. The Flathub app id com.github.tchx84.Flatseal still resolves to Flatseal today, and flatpak install flathub ... works without adding a remote first because Arch's flatpak 1.18.2-1 ships usr/share/flatpak/remotes.d/flathub.flatpakrepo and the Arch wiki says installation adds the Flathub repository system-wide. The cited Arch wiki Flatpak page supports the symptom and the cause almost word for word: it states that Flatpak Firefox shows a File not found error page for a local HTML file, and it describes the ~/.mozilla profile trap. The danger was directionally right but vague where a specific consequence exists, so it is rewritten to name what --filesystem=home actually exposes. I read https://github.com/flatpak/flatpak/blob/main/common/flatpak-exports.c and the only never-export list is dont_export_in[] (/.flatpak-info, /app, /dev, /etc, /proc, /run/flatpak, /run/host, /usr), none of which is under $HOME, and the only home path Flatpak hides under a home grant is ~/.var/app, which it tmpfs masks deliberately. So ~/.ssh and ~/.gnupg are exposed read-write and that is worth saying. Omarchy 4 note, confirmed on this workstation: flatpak is NOT installed and appears in no file under /usr/share/omarchy/install/*.packages. It is pulled in on demand by omarchy-pkg-add flatpak inside /usr/share/omarchy/bin/omarchy-install-gaming-geforce-now, and /usr/share/omarchy/default/omarchy/omarchy-menu.jsonc gates two menu entries on flatpak info com.nvidia.geforcenow. So Omarchy anticipates flatpak without shipping it, and keeping omarchy in applies_to is right: a user who hits this symptom on Omarchy necessarily installed flatpak already, so no install step is needed in the fix. What I could NOT exercise: with flatpak absent I ran no flatpak command at all, so the override, the Firefox profile behaviour and the Flatseal install rest on documentation and source reading, not on this machine. I deliberately left one documented option out of the record. The Arch wiki's first remedy is to exclude the host profile, which would be flatpak override --user --filesystem=home --nofilesystem=~/.mozilla org.mozilla.firefox, and flatpak-override.xml's own wording about --nofilesystem undoing a previous identical --filesystem and not preventing access to a more narrowly-scoped one is ambiguous about whether a narrow exclusion masks a broad grant in the same layer. Rather than ship a command I cannot run, the rewritten danger states the approach and recommends the narrow grant, which is unambiguous.
Granting --filesystem=home to Flatpak Firefox makes it find and load your host ~/.mozilla profile instead of the sandboxed one, so your tabs and history appear to vanish. The Arch wiki gives the sandboxed profile as ~/.var/app/org.mozilla.firefox/cache/mozilla/ and two ways out: change the permission so the host profile is excluded, or copy the sandboxed profile to ~/.mozilla first.
--filesystem=home is also a real security loosening and not only a Firefox annoyance. It is read-write access to the whole of $HOME, including ~/.ssh, ~/.gnupg, ~/.bashrc and ~/.config, so an app that is compromised or malicious can read private keys and gain persistence by writing to a shell startup file. Flatpak masks only ~/.var/app (other apps' data) and /.flatpak-info under a home grant, nothing else. Grant the narrowest path that works, and add the :ro suffix when the app only needs to read:
flatpak override --user --filesystem=~/Documents:ro org.mozilla.firefox
Symptom
Flatpak Firefox shows a "File not found" page when I open a local HTML file. Other Flatpak apps show empty folders or refuse to save into ~/Documents even though the files are clearly there.
Cause
The Flatpak sandbox only exposes the paths listed in the app's manifest plus any user overrides. Anything else simply is not visible inside the sandbox, so the app reports the file as missing rather than as a permission error.
Fix
Inspect what the app currently has, then grant just the directory you need:
flatpak info --show-permissions org.mozilla.firefox
flatpak override --user --filesystem=~/Documents org.mozilla.firefox
Other useful values: --filesystem=home, --filesystem=/mnt/data, --filesystem=xdg-download, and a :ro suffix for read-only. To take a permission away: --nofilesystem=home. To start over:
flatpak override --user --reset org.mozilla.firefox
For a GUI, install Flatseal:
flatpak install flathub com.github.tchx84.Flatseal
Verify
flatpak override --user --show org.mozilla.firefox lists the new filesystem entry, and the app can now open/save in that directory.
Sources
- https://wiki.archlinux.org/title/Flatpak
- https://docs.flatpak.org/en/latest/sandbox-permissions.html
- https://github.com/flatpak/flatpak/blob/main/doc/flatpak-override.xml
- https://github.com/flatpak/flatpak/blob/main/doc/flatpak-info.xml
- https://github.com/flatpak/flatpak/blob/main/common/flatpak-exports.c
- https://flathub.org/api/v2/appstream/com.github.tchx84.Flatseal
- https://archlinux.org/packages/extra/x86_64/flatpak/