2

Problem: When File Manager is opened from the Ubuntu Menu it shows the directories of different disks properly. When opened from within an application, it does not.

The OS is installed on Disk A.

Use case: Trying to save a file. e.g. a PDF file from the web, using Firefox. The same things happens in LibreOffice and Gimp. B.t.w. from these applications I can save into the default OS Documents in Home. The problems arise when trying to save elsewhere.

From within an application, the default File Manager pops up with the standard menu on the left, and at the bottom left of the window, the option Other Locations. In my setup I have two options: Computer (which lists the basic OS installation directories = Disk A), and Home Stuff (an additional internal disk, used for storing documents = Disk B).

However, when I open Disk B within an application clicking Other Locations, it does not show the directories actually on B, but the root directories on A – thus the same as when selecting Computer.

When opening File Manager from the standard OS menu on the left of the screen, Disk B opens normally and I have access to all its files.

About he Snap sandbox “override” by granting permissions: the YAML-manifest says removable-media, and mine is internal disk

snap connect some-snap-name:removable-media

Or is there another method?

Jacques
  • 31

1 Answers1

5

The reason you observe this discrepancy is because the applications, from which you are attempting to open files on different drives, are sandboxed applications, installed using the so called "Snap" system. This is a newer technology for packaging applications, which introduces additional safety: sandboxed applications do not have access to system files, and usually only have access to your user's home directory.

There are two possibilities to be able to read/write to the external storage using such applications:

  • Grant permission to each one of the snap application that need access.
  • mount --bind that storage to a folder under your home directory. Make sure that the storage volume is formatted with a file system supporting linux permissions (source).

There is one workaround: delete the Snap version of the application, and instead install an APT version. APT is the traditional packaging format on Debian linux and derivatives, and is how the core operating system is installed. Many applications, except Firefox, are available also as APT package (".deb" files). However, APT versions coming with the linux distribution may be older than their Snap equivalents. They are not updated, except for security updates. It is possible to install Firefox as an APT directly from Mozilla.

vanadium
  • 97,564