Access to /media/***/X.yyy file was denied

Hello everyone,
I’ve recently updated my LibreOffice suit to 5.4.2.2.0+, on my Ubuntu 16.04.3 LTS.

Whenever I try to access a document on my mounted media, I get an error message saying:

Access to /media/…/Data/…/…/xxx.yyy was denied.

I checked the permissions, and my user is able to read and write the file.
I even tried executing sudo libreoffice, and got the following output:

sudo libreoffice
mkdir: cannot create directory '/run/user/0': Permission denied
No protocol specified
No protocol specified
mkdir: cannot create directory '/run/user/0': Permission denied
No protocol specified
No protocol specified
:

Nothing happened afterwards, at least within the period of time I had allowed.

Right now, my workaround is to move the documents to the desktop, work on them, then recopy them back to the mounted drives. Is there a permanent solution to this nuisance ?

Some technical details according to LibreOffice’s Help > About LibreOffice:

Version: 5.4.2.2.0+ Build ID:
libreoffice-5.4.2.2-snap1 CPU threads:
4; OS: Linux 4.10; UI render: default;
VCL: gtk3; Locale: en-GB
(en_GB.UTF-8); Calc: group

Thanks in advance.

I have solved the issue. I had updated the LibreOffice package through snap, whose system has a certain architecture that requires users to manually authorise access permissions via interfaces’ connections.

After I had read many responses on the Internet, especially this and this, I ran the following command in Terminal:

sudo snap connect libreoffice:removable-media :removable-media

And now LibreOffice is able to access my mounted media’s data.

Worked perfect for me!