How to give a Flatpak app access to a directory

Solution 1:

You can do this via the command line. The specific command you need is (it may need to be run with sudo):

flatpak override <package_name_here> --filesystem=<path_here>

If you have an odd path & it complains about an "unexpected filesystem suffix", just put the path part in quotes.

If you wish to remove access to a particular address, use "--nofilesystem":

flatpak override <package_name_here> --nofilesystem=<path_here>

A more complete list of permissions/commands is found here - http://docs.flatpak.org/en/latest/sandbox-permissions.html

Solution 2:

To add to the other answer, another solution that worked for me was installing Flatseal. It makes setting permissions super easy and also has the added benefit of making the existing permissions really clear. Here's what adding a directory to steam looks like in Flatseal:

Adding extra directory to steam in Flatseal

I added the directory "MediaSSD" there, everything else is default.