KIO-mounted SMB filesystems isn't accessible within snaps(was: LibreOffice can't open files in /run)

My LibreOffice can’t write to /run

Got an SMB mounted there image

$ snap connections libreoffice
Interface               Plug                                Slot                            Notes
audio-playback          libreoffice:audio-playback          :audio-playback                 -
bluez                   libreoffice:bluez                   -                               -
content[gnome-42-2204]  libreoffice:gnome-42-2204           gnome-42-2204:gnome-42-2204     -
content[gtk-3-themes]   libreoffice:gtk-3-themes            gtk-common-themes:gtk-3-themes  -
content[icon-themes]    libreoffice:icon-themes             gtk-common-themes:icon-themes   -
content[sound-themes]   libreoffice:sound-themes            gtk-common-themes:sound-themes  -
cups-control            libreoffice:cups-control            :cups-control                   -
desktop                 libreoffice:desktop                 :desktop                        -
desktop-legacy          libreoffice:desktop-legacy          :desktop-legacy                 -
gsettings               libreoffice:gsettings               :gsettings                      -
home                    libreoffice:home                    :home                           -
network                 libreoffice:network                 :network                        -
network-bind            libreoffice:network-bind            :network-bind                   -
opengl                  libreoffice:opengl                  :opengl                         -
pulseaudio              libreoffice:pulseaudio              :pulseaudio                     -
removable-media         libreoffice:removable-media         :removable-media                -
screen-inhibit-control  libreoffice:screen-inhibit-control  :screen-inhibit-control         -
unity7                  libreoffice:unity7                  :unity7                         -
wayland                 libreoffice:wayland                 :wayland                        -
x11                     libreoffice:x11                     :x11                            -
$ snap --version
snap    2.63+22.04
snapd   2.63+22.04
series  16
neon    22.04
kernel  6.9.3-76060903-generic
1 Like

Hello, this is a known technical limitation of snaps as the home and removable-media snapd security confinement interfaces both do not support files under the /run filesystem hierarchy.

To support these use cases, a new security confinement interface may be required to be implemented in snapd; please search whether there’s already a bug report to request such a feature, and if not, file a new one to the snapd issue tracker.

For now, you may want to use different distributions of LibreOffice(like the one shipped in the Ubuntu archive or the upstream Debian packages) to avoid the problem.

While an interface might indeed be a solution, such /run mounted filesystems should rather be handled by xdg-portals and libreoffice should make use of them…

I’m not sure if there is already an implementation to access such filesystems in portals or if libreoffice simply lacks integration here, do you know if other snaps (i.e. snapped KDE or gnome Apps) can access these places?

Oh, and since this is not Ubuntu, I wonder if the desktop install you are using actually has all necessary xdg-portals packages preinstalled…

1 Like

It should (will need to check on Tuesday as it’s in my office). The original distro for that desktop is KDE Neon, and I just added Pop!_OS repo on it for the kernel and mesa.

It just needs xdg-desktop-portal-kde?

Won’t Firefox stop working without it? I changed it from the DEB to Snap.

Not sure where webdavs are getting mounted, but I wanna add that it also won’t save on my Nextcloud (mounted via Webdav).

Tried to save there with Firefox snap