tchx84 / Flatseal

Manage Flatpak permissions
GNU General Public License v3.0
1.22k stars 72 forks source link

How to add an sftp directory correctly to permissions? #708

Open thepragmaticmero opened 2 months ago

thepragmaticmero commented 2 months ago

I want to add permission the following folder correctly. image /run/user/1000/gvfs/sftp:host=192.168.18.21/home/ideapadhdd I'm worried about the little exclamation mark at the side. It appears instantly after typing a colon :. Should I replace it with /run/user/1000/gvfs/? It's stops complaining with that file path.

My obsidian vault needs access to that specific folder. The Obsidian.appimage didn't complain about access to sftp(because the lack of sandboxing).

rusty-snake commented 2 months ago

I'm worried about the little exclamation mark at the side.

Hover them to show a tooltip.

Also you can easily check if it works as expected by using flatpak run --command=sh <app-id>.

thepragmaticmero commented 2 months ago
$ flatpak run --command=bash md.obsidian.Obsidian
F: Unexpected filesystem suffix host=192.168.18.21/home/ideapadhdd, ignoring
[📦 md.obsidian.Obsidian ~]$

mmm interesting... I mean using /run/user/1000/gvfs works fine so.... for my use case its enough lol, but is there any way to only give access to a specific directory inside the sftp server??

rusty-snake commented 2 months ago

flatpak run --command=sh --filesystem=~/foo\\:bar org.gnome.TextEditor seems to work although being undocumented.

Now the question, does flatseal support this syntax?

thepragmaticmero commented 2 months ago

ohhh double backslash, interesting. On flatseal it keeps appearing as "This is not a valid option", so it's a bug that needs to be solved then. If it's not a feature bug, it is a UI bug.