Bug 109296 - Snap package: LO can't open or save remote files
Summary: Snap package: LO can't open or save remote files
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
5.3.4.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: CMIS
  Show dependency treegraph
 
Reported: 2017-07-24 02:32 UTC by ppa
Modified: 2023-06-17 10:56 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ppa 2017-07-24 02:32:06 UTC
Description:
The snap package's confinement is too strict and does not allow opening or saving documents on SMB shares (or other types of remote storage). Accessing documents on SMB storage is a common use case and the snap package should support it.

Steps to Reproduce:
1. Mount a SMB share in Nautilus
2. Open a LO document located within the shared filesystem


Actual Results:  
Error message: "General input/output error while accessing /run/user/1000/gvfs/smb-share:server=*********".


Expected Results:
LO should open the document.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0
Comment 1 Alex Thurgood 2017-07-24 08:24:00 UTC
I can confirm this. However, I don't know enough about snap packages to determine whether the package itself is to blame or the snapd framework and Ubuntu's application thereof.
Comment 2 ppa 2017-07-26 23:12:54 UTC
UPDATE:

Similarly the LO snap can't open documents in /tmp. This is a problem because it makes it impossible to open documents received as email attachments directly from Thunderbird.

The snap package's confinement must be either manually relaxed (I'm to sufficiently familiar with snap to be able to suggest how to do this) or the package should be built in Classic mode, where file access is not confined.
Comment 3 ArubIslander 2017-09-01 08:16:31 UTC
Additional permissions are gained in confinement mode by connecting to interfaces (plugs) that are exposed by other snaps (slots).
At the moment there are no interfaces that define access to remote mounts or the /tmp folder (if I am not mistaken about the last)

There does exist however an interface for granting access to mounts on /media and /run/media. This is the removable-media interface. The workaround I have done for other snaps that advertise the removable-media interface as a plug is to mount my remote filesystems under /media. This is how I have the keepassxc snap configured.

The current libreoffice snap does not advertise the removable-media interface plug, which I think it should do in any case, as you would also want to be able to open an document on removable media.

For access to the /tmp folder I suspect an interface request would need to be made here: https://bugs.launchpad.net/snappy/+bugs?field.tag=snapd-interface
Comment 4 QA Administrators 2018-10-23 02:48:34 UTC Comment hidden (obsolete)
Comment 5 Olivier Tilloy 2018-10-24 09:53:48 UTC
This issue is specific to the snap package, it's not an upstream libreoffice problem. It is being tracked at https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1729821, so this bug can be closed.
Comment 6 QA Administrators 2019-10-25 02:40:27 UTC Comment hidden (obsolete)
Comment 7 QA Administrators 2022-11-16 03:46:33 UTC Comment hidden (obsolete, spam)
Comment 8 Justin L 2023-06-17 10:56:22 UTC
Ubuntu's bug report hasn't received any attention yet. But in any case it isn't our snap, so closing this as per comment 5 (as well as inactivity for years).