Ubuntu – GIMP 2.10 Doesn’t Have Permission To Access a USB Drive. Why? How to Resolve? (18.04)

gimppermissionssnapusb

GIMP 2.10 (snap version) doesn't allow me to open the /media directory, so I'm unable to access my external USB drive. I get the following error message:

enter image description here

I get the same error message if I try and open an image file in Nautilus from the USB drive by Right-Click image file > Open with GIMP

I installed GIMP 2.10 with snap:

sudo snap install gimp

There's obviously something I'm missing in terms of configuration, but I can't find a similar question posted yet.

Update:

I was pointed to the solution to resolve the problem:
How do I get the latest GIMP version available?

You need to give the snap GIMP package explicit permission to access external media once installed:

sudo snap connect gimp:removable-media

Why we have to do this extra step, is alluded to by N0rbert:

How to get access to USB-storage from the application installed as Snap?

"…if the application does not have auto-connect of removable-media we need to connect it manually"

My question is why would an application package be created without the ability to access external media by default?

Best Answer

Sometimes the packager of the snap package gives the snap package explicit permission to access external media and sometimes the packager does not, so the decision to give the snap package explicit permission to access external media is left to the user. Since there's no overriding policy, the decision to enable removable media support is up to the packager of the snap package and after that it's up to the user.

I have observed that snap packages are generally less reliable than apt packages which means that I often install a snap package, and then I have to uninstall it because it didn't work properly. So I guess that not enabling removable media support on some snap packages adds another layer of security to the snap package that the packager thought it needed.

If you need GIMP to have full access to external media (such as USB flash drive, SD/MicroSD card, additional mounted hard drive and so on), run the following command:

sudo snap connect gimp:removable-media
$ sudo snap connect gimp:removable-media
$ snap connections gimp
Interface              Plug                  Slot                            Notes
content[gtk-3-themes]  gimp:gtk-3-themes     gtk-common-themes:gtk-3-themes  -
content[icon-themes]   gimp:icon-themes      gtk-common-themes:icon-themes   -
content[sound-themes]  gimp:sound-themes     gtk-common-themes:sound-themes  -
cups-control           gimp:cups-control     -                               -
dbus                   -                     gimp:dbus-gimp                  -
desktop                gimp:desktop          :desktop                        -
desktop-legacy         gimp:desktop-legacy   :desktop-legacy                 -
gsettings              gimp:gsettings        :gsettings                      -
home                   gimp:home             :home                           -
network                gimp:network          :network                        -
opengl                 gimp:opengl           :opengl                         -
removable-media        gimp:removable-media  :removable-media                manual
unity7                 gimp:unity7           :unity7                         -
wayland                gimp:wayland          :wayland                        -
x11                    gimp:x11              :x11                            -