Hacker News new | past | comments | ask | show | jobs | submit login

> Almost all popular apps on Flathub still come with filesystem=host or filesystem=home permissions, in other words, write access to the user home directory

I agree it's absurd to have a sandbox system that doesn't protect the home directory [1]

Browsers and smartphones have an advantage here, because every app uses their file-open and file-save dialogs. If the user wants to open /home/user/pictures/whatever.jpg the sandboxed code gets access to that file and that file only, with the user's explicit consent. And if the app's file formats and suchlike don't match that way of working, tough luck because there's no alternative.

Whereas on Linux, where there are already 6+ other ways of packaging and distributing your app, a new entrant doesn't have the power to dictate terms or force developers to change their programs. And distributing a version of Gimp that couldn't open files in the user's home directory would be absurd.

[1] https://xkcd.com/1200/




OS X managed to solve this using the standard file browser API grants access to the file. That’s a little more challenging on Linux though perhaps not impossible.


That's exactly how it works in Flatpak, and you get it for free if you use GTK's FileChooserNative dialog: https://developer.gnome.org/gtk3/stable/gtk3-GtkFileChooserN...

If your application is inside a sandbox, it communicates with another process that presents the file chooser and hands over permissions based on the user's selection.

It is possible to choose directories in the same way, and portals are always improving: https://github.com/flatpak/xdg-desktop-portal.

Plenty of Flatpak applications actually do use this, but the author of this website loves to pick out the ones that don't so he can act like the project is flawed to the core and justify his sensationalist domain name. But actually it is very solvable, it is being solved, and in many cases you can tighten an application's sandbox with a two line diff.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: