How to let Filezilla flatpak access /mnt and /etc?

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
SinfulSaint
Level 1
Level 1
Posts: 26
Joined: Tue May 22, 2018 11:04 am

How to let Filezilla flatpak access /mnt and /etc?

Post by SinfulSaint »

[ split from viewtopic.php?f=47&t=271779 ]

Hey all,
sorry to hijack your post, but does anybody know how to make flatpak installed FileZilla see system folders such as /mnt, /etc and others?
I can't transfer stuff to my Windows mounted shares because flatpak FZ does not see them.
FZ installed via repository works fine although not updated.

User avatar
xenopeek
Level 24
Level 24
Posts: 24725
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: How to let Filezilla flatpak access /mnt and /etc?

Post by xenopeek »

Flatpak is also a security sandbox. By default the Filezilla flatpak from flathub can only see files in your home directory. You can override this if you need.

Test it out by running flatpak with intended changes once, before storing changes in the configuration. You'll do both from the commandline in lieu of a GUI but once configuration changes are stored you cna launch Filezilla from the menu as per normal.

You wanted Filezilla to have access to /mnt and /etc. There are multiple ways to achieve this with the "--filesystem" option.
  • The cleanest is to be specific, so that you leave as much as possible of the security sandbox functioning to protect your system from malware or attacks that would try to exploit bugs in Filezilla. After closing any open Filezilla windows you can try starting it with this command to see if that meets your needs; it uses a "--filesystem=absolute-path" option for each system directory you want Filezilla to have access to:
    flatpak run --filesystem=/mnt --filesystem=/etc org.filezillaproject.Filezilla
  • You could do it a little more secure by specifying that for example the /etc directory can only be read from by Filezilla. Just tack ":ro" on to the absolute path in the "--filesystem" option to do that. Such as:
    flatpak run --filesystem=/mnt --filesystem=/etc:ro org.filezillaproject.Filezilla
  • If none of that meets your needs (after adding "--filesystem" options as needed for additional system directories) you could also grant Filezilla access to your entire system and abandon the entire filesystem protection. You'd do that with:
    flatpak run --filesystem=host org.filezillaproject.Filezilla
So test out that the Filezilla you've just started with one of the above commands does what you need. After confirming that you can close Filezilla again and now run the override command to store the configuration changes and make them permanent.

Taking the first command from above as example, to store the configuration changes just replace the "run" argument in the command with "override --user" (as we want to make these changes just for you) as such:
flatpak override --user --filesystem=/mnt --filesystem=/etc org.filezillaproject.Filezilla
Replace as per which "--filesystem" options you need. That should be it and next time you start Filezilla it will use these overrides.

This is all documented in the flatpak-override manpage. It describes more options there, for example for granting flatpaks access to additional parts of your home directory where by default they only have access to a part of your home directory (like a web browser that would only get access to Downloads by default).

As for updates, Filezilla was updated 2 days ago on Flathub to version 3.37.4 and should likely be on your system now https://flathub.org/apps/details/org.fi ... .Filezilla. Updates for flatpaks are automatic and done in the background shortly after you boot your system and login to it.
Image

SinfulSaint
Level 1
Level 1
Posts: 26
Joined: Tue May 22, 2018 11:04 am

Re: How to let Filezilla flatpak access /mnt and /etc?

Post by SinfulSaint »

Nice, thank you so much! Will give it a try.

Best,

Post Reply

Return to “Software & Applications”