Libreoffice can't save in home dir

Hi,
I tried to use libreoffice snap today but I can’t save documents in my homedir.

libreoffice        7.0.4.2                     204    latest/stable    canonical✓        -

image

Is this an expected behaviour?

Thx,

snap packages have per-application homedirs under ~/snap/

that way your administrator could disconnect the home interface (so the app would not have access to any docs in your home) and the app will still work fine and have a place to store docs and data …

while the default paths are a bit inconvenient you are able to always navigate to your home dir in the save-as dialogs …
…and you should also be able to edit the config of libreoffice to change that default.

Thanks for the reply, but the problem is that an error shows up in the save-as dialog when trying to store a file in my homedir (e.g. ~/test.odt). (= I guess the home interface wasn’t connected automatically). In the mean time I switched to the deb (because its newer 7.1) and allows me to use an installed certificate manager (seahorse) for signing documents, which on the first glimpse the snap version couldn’t.

that would be rather unusual, it auto-connects everywhere except in UbuntuCore installs (which do not come with a desktop). it would have been good to file a bug about this with some info and logs attached so that issue can be fixed …

I’ve

  1. reinstalled the snap
  2. create a document
  3. use the save-as dialog to save it in my homedir as ~\test.odt

and get:
libreoffice_snap_save_homedir_bug

/home/gerhard  snap info --verbose libreoffice
name:    libreoffice
summary: LibreOffice is a powerful office suite including word processing and creation of
  spreadsheets, slideshows and databases
health:
  status:  unknown
  message: health has not been set
publisher: Canonical✓
store-url: https://snapcraft.io/libreoffice
contact:   https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bugs?field.tag=snap
license:   unset
description: |
  LibreOffice is a powerful and free office suite, used by millions of people around the world. Its
  clean interface and feature-rich tools help you unleash your creativity and enhance your
  productivity. LibreOffice includes several applications that make it the most versatile Free and
  Open Source office suite on the market: Writer (word processing), Calc (spreadsheets), Impress
  (presentations), Draw (vector graphics and flowcharts), Base (databases), and Math (formula
  editing).
commands:
  - libreoffice.base
  - libreoffice.calc
  - libreoffice.draw
  - libreoffice.filebug
  - libreoffice.impress
  - libreoffice
  - libreoffice.math
  - libreoffice.writer
notes:               
  private:           false
  confinement:       strict
  devmode:           false
  jailmode:          false
  trymode:           false
  enabled:           true
  broken:            false
  ignore-validation: false
base:         core18
snap-id:      CpUkI0qPIIBVRsjy49adNq4D6Ra72y4v
tracking:     latest/stable
refresh-date: today at 10:40 CET
channels:
  latest/stable:    7.0.4.2 2021-02-03 (204) 647MB -
  latest/candidate: 7.0.4.2 2021-02-03 (204) 647MB -
  latest/beta:      ↑                              
  latest/edge:      7.0.2.2 2020-10-08 (193) 655MB -
installed:          7.0.4.2            (204) 647MB -

journalctl -u snapd
#shows only one relevant entry for this installation:
Feb 25 10:40:52 prestige15 snapd[1306]: api.go:1007: Installing snap "libreoffice" revision unset

A lot of audit reports:

 /home/gerhard  sudo sysctl -w kernel.printk_ratelimit=0 ; journalctl --follow | grep audit
kernel.printk_ratelimit = 0
Feb 25 10:54:03 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mountinfo" pid=27100 comm="gmain" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:03 prestige15 kernel: audit: type=1400 audit(1614246843.346:949): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mountinfo" pid=27100 comm="gmain" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:03 prestige15 kernel: audit: type=1400 audit(1614246843.346:950): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/etc/fstab" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Feb 25 10:54:03 prestige15 kernel: audit: type=1400 audit(1614246843.346:951): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mountinfo" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:03 prestige15 kernel: audit: type=1400 audit(1614246843.346:952): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mounts" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:03 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/etc/fstab" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Feb 25 10:54:03 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mountinfo" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:03 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mounts" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:03 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mountinfo" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:03 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mounts" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:03 prestige15 kernel: audit: type=1400 audit(1614246843.434:953): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mountinfo" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:03 prestige15 kernel: audit: type=1400 audit(1614246843.434:954): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mounts" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:03 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mountinfo" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:03 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mounts" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:03 prestige15 kernel: audit: type=1400 audit(1614246843.462:955): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mountinfo" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:03 prestige15 kernel: audit: type=1400 audit(1614246843.462:956): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mounts" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:03 prestige15 audit[1277]: USER_AVC pid=1277 uid=103 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/hostname1" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.230" pid=8917 label="snap.thunderbird.thunderbird" peer_pid=27604 peer_label="unconfined"
Feb 25 10:54:03 prestige15 audit[1277]: USER_AVC pid=1277 uid=103 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/hostname1" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.230" pid=27100 label="snap.libreoffice.writer" peer_pid=27604 peer_label="unconfined"
Feb 25 10:54:03 prestige15 audit[1277]: USER_AVC pid=1277 uid=103 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/hostname1" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.230" pid=27100 label="snap.libreoffice.writer" peer_pid=27604 peer_label="unconfined"
Feb 25 10:54:03 prestige15 kernel: audit: type=1107 audit(1614246843.510:957): pid=1277 uid=103 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/hostname1" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.230" pid=8917 label="snap.thunderbird.thunderbird" peer_pid=27604 peer_label="unconfined"
Feb 25 10:54:03 prestige15 kernel: audit: type=1107 audit(1614246843.510:958): pid=1277 uid=103 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/hostname1" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.230" pid=27100 label="snap.libreoffice.writer" peer_pid=27604 peer_label="unconfined"
Feb 25 10:54:03 prestige15 kernel: audit: type=1107 audit(1614246843.510:959): pid=1277 uid=103 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/hostname1" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.230" pid=27100 label="snap.libreoffice.writer" peer_pid=27604 peer_label="unconfined"
Feb 25 10:54:03 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mountinfo" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:03 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mounts" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:03 prestige15 kernel: audit: type=1400 audit(1614246843.522:960): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mountinfo" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:03 prestige15 kernel: audit: type=1400 audit(1614246843.522:961): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mounts" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.438:962): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.438:963): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.438:964): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.438:965): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.438:966): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.438:967): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.438:968): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.438:969): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.438:970): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.438:971): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.438:972): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.438:973): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.438:974): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.438:975): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.442:976): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.442:977): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.442:978): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.442:979): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.442:980): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.442:981): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.442:982): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.442:983): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.442:984): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.442:985): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.442:986): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.442:987): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.442:988): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.442:989): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.442:990): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.442:991): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.442:992): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.446:993): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.446:994): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.446:995): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.446:996): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.446:997): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.446:998): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.446:999): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.446:1000): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.446:1001): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.446:1002): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.446:1003): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.446:1004): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.446:1005): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.446:1006): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.446:1007): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.446:1008): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.446:1009): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.446:1010): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:06 prestige15 kernel: audit: type=1400 audit(1614246846.446:1011): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="pool" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:10 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mountinfo" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:10 prestige15 kernel: audit: type=1400 audit(1614246850.966:1012): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mountinfo" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:10 prestige15 kernel: audit: type=1400 audit(1614246850.966:1013): apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mounts" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:10 prestige15 audit[27100]: AVC apparmor="DENIED" operation="open" profile="snap.libreoffice.writer" name="/proc/27100/mounts" pid=27100 comm="soffice.bin" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Feb 25 10:54:10 prestige15 audit[27100]: AVC apparmor="DENIED" operation="mknod" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="soffice.bin" requested_mask="c" denied_mask="c" fsuid=1000 ouid=1000
Feb 25 10:54:10 prestige15 kernel: audit: type=1400 audit(1614246850.994:1014): apparmor="DENIED" operation="mknod" profile="snap.libreoffice.writer" name=/home/gerhard/REDACTED pid=27100 comm="soffice.bin" requested_mask="c" denied_mask="c" fsuid=1000 ouid=1000
Feb 25 11:01:44 prestige15 audit[27100]: SECCOMP auid=1000 uid=1000 gid=1000 ses=3 subj=snap.libreoffice.writer pid=27100 comm="soffice.bin" exe="/snap/libreoffice/204/lib/libreoffice/program/soffice.bin" sig=0 arch=c000003e syscall=92 compat=0 ip=0x7f8769bdd4b7 code=0x50000
Feb 25 11:01:44 prestige15 kernel: audit: type=1326 audit(1614247304.464:1015): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.libreoffice.writer pid=27100 comm="soffice.bin" exe="/snap/libreoffice/204/lib/libreoffice/program/soffice.bin" sig=0 arch=c000003e syscall=92 compat=0 ip=0x7f8769bdd4b7 code=0x50000

Anything else needed?

snap connections libreoffice and snap version (full output) would also be interesting …

sure:

snap connections libreoffice                 
Interface                 Plug                                Slot                             Notes
audio-playback            libreoffice:audio-playback          :audio-playback                  -
bluez                     libreoffice:bluez                   -                                -
content[gnome-3-28-1804]  libreoffice:gnome-3-28-1804         gnome-3-28-1804:gnome-3-28-1804  -
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.48.3+20.04
snapd   2.48.3+20.04
series  16
ubuntu  20.04
kernel  5.8.0-44-generic

Is your home directory network mounted?

What’s the output of lsblk -p | grep home?

No it isn’t:

 ~  lsblk -p | grep home
# nothing...

Ok, so what happens if you open LibreOffice, and use the file -> open dialog to browse to /home/gerhard? Further, saving, if you try specifically navigating to your home rather than typing in the path/file name.

I tried to navigate to “home” but clicking on the button doesn’t change anything:
image

i’m sure @popey meant to literally navigate to /home/gerhard, as i explained above the homedir variable (that this button reflects) points to an app specific home. (IIRC Ctrl-L should give you a location input field in that dialog)

Sorry for being dense about the per snap homedir.
Regarding your question: I can navigate and list my homedir contents, but if I want to open a file from there a message appears stating that the lock file can be created and so I can only open it as read-only.
There’s no difference whether I try to navigate to my homedir in the open/save dialog or enter the path directly. The error “object is not available…” is shown in both cases.

Update: a reboot doesn’t help.

Can you save documents to a subdirectory of your home directory (other than ~/snap)?

The main difference in the way the snap sandbox treats your home directory different to subdirectories under your home directory is that it blocks access to hidden “dot files”.

When an application tries to save, it’s common to write the new version to a temporary file and then rename it over the old version (or move the old version to a backup name). If LibreOffice is using a hidden file name for its temporary file, then it would be possible to save to subdirectories of your home directory, but not the home directory itself.

Yes, I can save files in subdirectories of my home directory! I wonder if there’s a way to make the special treatment of the home directory regarding hidden files more transparent.

2 Likes

Thanks for your patience in this issue @laborg!

1 Like

And for reference, this is a known issue.

2 Likes

When will they fix this problem?
Three years have already passed.
It will be a victory for flatpak and that’s why the Ubuntu flavors (mate and Xubuntu) start to implement it?

five years have already passed.

I am not sure how they could fix this in a supportable way. It’s a tough one.

I initially thought the snap of LibreOffice could be patched so it doesn’t make files of that name, but something that can be written in $HOME, i.e. something that isn’t hidden. But that’s no good because the point of the file name is to be consistent, so two people trying to edit the same file, don’t end up clashing. If one person has one filename lock file, and another person (using non-snap) has a different name then locking will fail and data could be lost.

Another option might be to patch the snap so it actually cannot write in $HOME (but can write to subdirectories) at all, which is also brutal.

A further option might be for snapd to grow a new interface - just for LibreOffice, which has very fine-grained permissions to allow the application to write to that specific format of hidden file in the home folder. This seems like the most reasonable, and potentially secure fix.

Maybe someone on the snapd team might be able to chime in, and perhaps it could get on someone’s backlog, or a community person could contribute - given snapd is open source.