I’ll start by saying I wasn’t sure how to file this at all. Desktop? Security? New install? Snaps? I’m going with the most generic but if that’s incorrect please move it.
Ubuntu Version:
24.04 LTS
Desktop Environment (if applicable):
GNOME
Problem Description:
I want to move back to centralized user for all the hosts in my home with profiles on server but can’t get snaps to work with this setup
- On my server I configured NFSv4 and exported.
- On my freshly installed ubuntu 24.04 LTS client system I created /mnt/home and configured /etc/fstab with the NFS so that it automounts on boot
- Based on several old snap bug reports I then did a --bind mount from /mnt/home to /home
- tried to get firefox to launch
exports
/mnt/profiles/user 192.168.1.11(rw,async,root_squash,all_squash,crossmnt,anonuid=1000)
client fstab
192.168.1.131:/mnt/profiles /mnt/home nfs4 rw,async,relatime,vers=4.2,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.11,local_lock=none,addr=192.168.1.131 0 0
/mnt/home /home none bind
the system now boots correctly, logs in and and loads the profiles correctly but any attempt to use a snap fails with apparmor DENIED messages
failure logs
Apr 19 00:59:35 testhost kernel: audit: type=1400 audit(1745038775.148:466): apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox" name=2F686F6D652F776272622F736E61702F66697265666F782F636F6D6D6F6E2F2E6D6F7A>
Apr 19 00:59:35 testhost kernel: audit: type=1400 audit(1745038775.178:467): apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox" name="/home/user/snap/firefox/common/.cache/gdk-pixbuf-loaders.cache" pid=4>
Apr 19 00:59:35 testhost kernel: audit: type=1400 audit(1745038775.198:468): apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox" name="/home/user/snap/firefox/6042/.config/pulse/" pid=4368 comm="threaded->
Apr 19 00:59:35 testhost kernel: audit: type=1400 audit(1745038775.198:469): apparmor="DENIED" operation="rmdir" class="file" profile="snap.firefox.firefox" name="/home/user/snap/firefox/6042/.config/pulse/" pid=4368 comm="threaded>
Apr 19 00:59:35 testhost firefox_firefox.desktop[4368]: Failed to load cookie file from cookie: Permission denied
Apr 19 00:59:35 testhost kernel: audit: type=1400 audit(1745038775.200:470): apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox" name="/home/user/snap/firefox/6042/.config/pulse/cookie" pid=4368 comm="thr>
Apr 19 00:59:35 testhost kernel: audit: type=1400 audit(1745038775.200:471): apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox" name="/home/user/snap/firefox/6042/.config/pulse/cookie" pid=4368 comm="thr>
Apr 19 00:59:35 testhost kernel: audit: type=1400 audit(1745038775.206:472): apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox" name="/home/user/snap/firefox/common/.cache/event-sound-cache.tdb.OptiPlex->
Apr 19 00:59:35 testhost kernel: audit: type=1400 audit(1745038775.213:473): apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox" name="/home/user/snap/firefox/common/.cache/event-sound-cache.tdb.Op
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[17984]: /snap/snapd-desktop-integration/253/gnome-platform/command-chain/desktop-launch: line 129: /home/user/snap/snapd-desktop-integration/253/.config/u>
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18051]: /snap/snapd-desktop-integration/253/gnome-platform/command-chain/desktop-launch: line 289: /home/user/snap/snapd-desktop-integration/253/.config/u>
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18052]: /snap/snapd-desktop-integration/253/gnome-platform/command-chain/desktop-launch: line 290: /home/user/.config/user-dirs.dirs: Permission denied
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18053]: cp: cannot open '/home/user/.config/user-dirs.locale' for reading: Permission denied
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18054]: /snap/snapd-desktop-integration/253/gnome-platform/command-chain/desktop-launch: line 295: /home/user/.config/user-dirs.locale: Permission denied
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[17984]: /snap/snapd-desktop-integration/253/gnome-platform/command-chain/desktop-launch: line 129: /home/user/snap/snapd-desktop-integration/253/.config/u>
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18055]: Can't save user-dirs.dirs
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[17984]: /snap/snapd-desktop-integration/253/gnome-platform/command-chain/desktop-launch: line 129: /home/user/snap/snapd-desktop-integration/253/.config/u>
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18074]: rm: cannot remove '/home/user/snap/snapd-desktop-integration/253/.local/share/themes': Permission denied
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[17984]: /snap/snapd-desktop-integration/253/gnome-platform/command-chain/desktop-launch: line 439: /home/user/snap/snapd-desktop-integration/253/.config/f>
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18075]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/253/.local/share/themes': Permission denied
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18076]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/253/.themes': Permission denied
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18079]: rm: cannot remove '/home/user/snap/snapd-desktop-integration/common/.cache/gio-modules'
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18081]: rm: cannot remove '/home/user/snap/snapd-desktop-integration/253/.local/share/glib-2.0/schemas'
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18079]: : Permission denied
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18081]: : Permission denied
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18083]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/gio-modules/libdconfsettings.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18083]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/gio-modules/libgioenvironmentproxy.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18083]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/gio-modules/libgiognomeproxy.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18083]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/gio-modules/libgiognutls.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18083]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/gio-modules/libgiolibproxy.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18091]: Unable to open directory /home/user/snap/snapd-desktop-integration/common/.cache/gio-modules: Error opening directory “/home/user/snap/snapd-deskt>
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18095]: rm: cannot remove '/home/user/snap/snapd-desktop-integration/common/.cache/gdk-pixbuf-loaders.cache': Permission denied
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[17984]: /snap/snapd-desktop-integration/253/gnome-platform/command-chain/desktop-launch: line 533: /home/user/snap/snapd-desktop-integration/common/.cache>
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18097]: rm: cannot remove '/home/user/snap/snapd-desktop-integration/253/.local/share/icons': Permission denied
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18105]: rm: cannot remove '/home/user/snap/snapd-desktop-integration/253/.config/ibus/bus': Permission denied
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18108]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/253/.config/ibus/bus': Permission denied
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18113]: rm: cannot remove '/home/user/snap/snapd-desktop-integration/common/.cache/immodules': Permission denied
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18118]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/immodules/im-am-et.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18118]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/immodules/im-broadway.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18118]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/immodules/im-cedilla.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18118]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/immodules/im-cyrillic-translit.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18118]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/immodules/im-fcitx.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18118]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/immodules/im-ibus.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18118]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/immodules/im-inuktitut.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18118]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/immodules/im-ipa.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18118]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/immodules/im-multipress.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18118]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/immodules/im-thai.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18118]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/immodules/im-ti-er.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18118]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/immodules/im-ti-et.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18118]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/immodules/im-viqr.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18118]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/immodules/im-wayland.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18118]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/immodules/im-waylandgtk.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[18118]: ln: failed to create symbolic link '/home/user/snap/snapd-desktop-integration/common/.cache/immodules/im-xim.so': File exists
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[17984]: /snap/snapd-desktop-integration/253/gnome-platform/command-chain/desktop-launch: line 627: /home/user/snap/snapd-desktop-integration/common/.cache>
Apr 18 22:07:56 testhost snapd-desktop-integration.snapd-desktop-integration[17984]: /snap/snapd-desktop-integration/253/gnome-platform/command-chain/desktop-launch: line 638: /home/user/snap/snapd-desktop-integration/253/.last_rev
I’ve configured the /etc/apparmor.d/tunables/home to allow /home/ and /mnt/home/ but this does not permit the firefox snap to load, it gets stuck at profile creation. (although it successfully creates all the files and directories)
# @{HOMEDIRS} is a space-separated list of where user home directories
# are stored, for programs that must enumerate all home directories on a
# system.
@{HOMEDIRS}=/home/ /mnt/home/
# @{HOME} is a space-separated list of all user home directories. While
# it doesn't refer to a specific home directory (AppArmor doesn't
# enforce discretionary access controls) it can be used as if it did
# refer to a specific home directory
@{HOME}=@{HOMEDIRS}/*/ /root/ /home/ /mnt/home/
Relevant System Information:
regular desktop w/ i5 and 16GB RAM, fresh install of 24.04 fully patched, can try in a vm if that might help
What I’ve Tried:
- googled and read every snap apparmor nfs item I could find on the topic (and there are a many older ones) but i get the impression tunables/home should fix
- validated I have rw on the NFS mount and that its otherwise working (although perhaps I’m missing an obscure option since ln seems to fail the most ?)
- validated that 2 different snaps have the problem (firefox and steam)
- many reboots, daemon-reloads, apparmor_parser -r , mounts, unmounts, nfs options, and log file reviews
- aa-status and complain
I would also love to know if there are better tools for troubleshooting this or any other hints or pointers