3

Is there some specific way of granting LibreOffice - specifically calc in my case - access to write to my home directory or does that go completely against the point of using snaps in the first place?

Every document I open says:

The lock file could not be created for exclusive access by LibreOfficem, due to missing permission to create a lock file on that file location or lack of free disk space.

EDIT:

Wed May 02 10:40 AM ~: df -h
Filesystem                   Size  Used Avail Use% Mounted on
udev                         7.8G     0  7.8G   0% /dev
tmpfs                        1.6G  2.2M  1.6G   1% /run
/dev/mapper/ubuntu--vg-root  467G   43G  400G  10% /
tmpfs                        7.9G  284M  7.6G   4% /dev/shm
tmpfs                        5.0M  4.0K  5.0M   1% /run/lock
tmpfs                        7.9G     0  7.9G   0% /sys/fs/cgroup
/dev/loop0                   141M  141M     0 100% /snap/gnome-3-26-1604/59
/dev/loop2                   3.8M  3.8M     0 100% /snap/gnome-system-monitor/39
/dev/loop1                    13M   13M     0 100% /snap/gnome-characters/69
/dev/loop5                    87M   87M     0 100% /snap/core/4486
/dev/loop3                    94M   94M     0 100% /snap/slack/6
/dev/loop4                   141M  141M     0 100% /snap/gnome-3-26-1604/62
/dev/loop6                   135M  135M     0 100% /snap/discord/60
/dev/loop7                   136M  136M     0 100% /snap/gimp/30
/dev/loop8                   145M  145M     0 100% /snap/gimp/33
/dev/loop9                   584M  584M     0 100% /snap/intellij-idea-ultimate/42
/dev/loop10                  194M  194M     0 100% /snap/goland/13
/dev/loop11                   34M   34M     0 100% /snap/sublime-text/7
/dev/nvme0n1p2               705M   86M  568M  14% /boot
/dev/loop12                  3.4M  3.4M     0 100% /snap/gnome-system-monitor/36
/dev/loop13                  240M  240M     0 100% /snap/pycharm-community/60
/dev/nvme0n1p1               511M  4.7M  507M   1% /boot/efi
/dev/loop14                  126M  126M     0 100% /snap/discord/52
/dev/loop15                   21M   21M     0 100% /snap/gnome-logs/25
/dev/loop16                   22M   22M     0 100% /snap/gnome-logs/31
/dev/loop17                  458M  458M     0 100% /snap/libreoffice/59
/dev/loop18                  1.7M  1.7M     0 100% /snap/gnome-calculator/154
/dev/loop19                  2.4M  2.4M     0 100% /snap/gnome-calculator/167
/dev/loop20                  163M  163M     0 100% /snap/spotify/13
/dev/loop21                   13M   13M     0 100% /snap/gnome-characters/86
tmpfs                        1.6G   16K  1.6G   1% /run/user/120
tmpfs                        1.6G   92K  1.6G   1% /run/user/1000

Here's a snippet of the syslog:

May  2 11:30:24 legion kernel: [11375.932122] audit: type=1400 audit(1525285824.016:135461): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=6007 comm="Discord" requested_mask="trace" denied_mask="trace" peer="unconfined"
May  2 11:30:24 legion guake.desktop[3757]: Showing the terminal
May  2 11:30:28 legion dbus-daemon[2080]: apparmor="DENIED" operation="dbus_method_call"  bus="session" path="/org/libreoffice" interface="org.freedesktop.DBus.Properties" member="GetAll" name=":1.13" mask="receive" pid=15688 label="snap.libreoffice.calc" peer_pid=2219 peer_label="unconfined"
May  2 11:30:34 legion kernel: [11385.935299] kauditd_printk_skb: 150 callbacks suppressed
May  2 11:30:34 legion kernel: [11385.935302] audit: type=1400 audit(1525285834.016:135612): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=6007 comm="Discord" requested_mask="trace" denied_mask="trace" peer="unconfined"

Here's the contents of home.d:

Wed May 02 11:33 AM home.d: la
total 8.0K
-rw-r--r-- 1 root root 634 Apr 17 13:15 site.local
-rw-r--r-- 1 root root 337 Apr 26 11:23 ubuntu
/etc/apparmor.d/tunables/home.d

Contents of site.local:

Wed May 02 11:33 AM home.d: cat site.local 
# ------------------------------------------------------------------
#
#    Copyright (C) 2010 Canonical Ltd.
#    This program is free software; you can redistribute it and/or
#    modify it under the terms of version 2 of the GNU General Public
#    License published by the Free Software Foundation.
#
# ------------------------------------------------------------------

# The following is a space-separated list of where additional user home
# directories are stored, each must have a trailing '/'. Directories added
# here are appended to @{HOMEDIRS}.  See tunables/home for details. Eg:
#@{HOMEDIRS}+=/srv/nfs/home/ /mnt/home/

Contents of ubuntu

Wed May 02 11:33 AM home.d: cat ubuntu 
# This file is auto-generated. It is recommended you update it using:
# $ sudo dpkg-reconfigure apparmor
#
# The following is a space-separated list of where additional user home
# directories are stored, each must have a trailing '/'. Directories added
# here are appended to @{HOMEDIRS}.  See tunables/home for details.
#@{HOMEDIRS}+=
9
  • just to make sure: do you have enough free disk space? May 2, 2018 at 17:40
  • definitely enough disk space - added df -h output May 2, 2018 at 17:41
  • What directories does it let you write to? May 2, 2018 at 17:42
  • If I select edit a copy of the document it defaults to /home/username/snap/libreoffice/59/Documents/Untitled 1 May 2, 2018 at 17:43
  • What does grep audit /var/log/syslog show? and to make sure: "username" means $USER or does it actually say "username"? Oh, and I would start investigating apparmor. Do you have a /etc/apparmor.d/tunables/home.d? and if so what is in it?
    – Rinzwind
    May 2, 2018 at 18:20

1 Answer 1

0

Go into the Ubuntu Software store and search for Libre Office. It should show as installed with 3 options, 1.launch, 2. remove and 3. permissions. Check how the permissions are set up from the permissions button.

3
  • Print documents: On Access files in your home folder: On Play and record sound: On Read/write files on removable storage devices: On. May 2, 2018 at 23:20
  • Was hoping for a different results. Probably not recommended, but you could uninstall libreoffice and then install it with the snap --classic option. This "disables security confinement"
    – rkeaing
    May 3, 2018 at 0:00
  • I'll try toggling the permission. Of note is the fact that LibreOffice froze during install at 99% and I had to reboot to get the Software Center back. When I rebooted - it was installed. So definitely something went wrong there I feel. May 3, 2018 at 17:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .