Background to this is that I'm getting errors when trying to run the snap-store, so I'm trying to investigate what broke. When I try to run it I get a ton of "permission denied" errors:
$ snap-store
utils.go:684: cannot change mount namespace of snap "snap-store" according to change mount (/snap/gtk-common-themes/1514/share/icons/Adwaita /snap/snap-store/518/data-dir/icons/Adwaita none bind,ro 0 0): cannot open directory "/snap/snap-store/518/data-dir": permission denied
utils.go:684: cannot change mount namespace of snap "snap-store" according to change mount (/snap/gtk-common-themes/1514/share/icons/Ambiant-MATE /snap/snap-store/518/data-dir/icons/Ambiant-MATE none bind,ro 0 0): cannot open directory "/snap/snap-store/518/data-dir": permission denied
utils.go:684: cannot change mount namespace of snap "snap-store" according to change mount (/snap/gtk-common-themes/1514/share/icons/Breeze_Snow /snap/snap-store/518/data-dir/icons/Breeze_Snow none bind,ro 0 0): cannot open directory "/snap/snap-store/518/data-dir": permission denied
.... [tens of lines of these]
utils.go:684: cannot change mount namespace of snap "snap-store" according to change mount (/snap/gtk-common-themes/1514/share/themes/elementary /snap/snap-store/518/data-dir/themes/elementary none bind,ro 0 0): cannot open directory "/snap/snap-store/518/data-dir": permission denied
utils.go:684: cannot change mount namespace of snap "snap-store" according to change mount (/snap/gnome-3-34-1804/60 /snap/snap-store/518/gnome-platform none bind,ro 0 0): permission denied
cannot update snap namespace: cannot open directory "/snap/snap-store/518/gnome-platform": permission denied
snap-update-ns failed with code 1: File exists
Now, these actually exist and are world-readable; for example:
$ ls -l /snap/snap-store/518/data-dir
drwxr-xr-x 2 root root 3 Dec 17 22:32 icons
drwxr-xr-x 2 root root 3 Dec 17 22:32 sounds
drwxr-xr-x 2 root root 3 Dec 17 22:32 themes
$ ls -ald /snap/
drwxr-xr-x 14 root root 4096 Dec 22 14:17 /snap/
$ ls -ald /snap/snap-store/
drwxr-xr-x 4 root root 4096 Dec 20 10:10 /snap/snap-store/
$ ls -ald /snap/snap-store/518
drwxr-xr-x 12 root root 174 Dec 17 22:53 /snap/snap-store/518
So why is it complaining about permission denied? What is the true reason it fails to start? Any ideas?
I've not really found much online other than a suggestion to run sudo usysconf run -f
but that did not explain why (and furthermore did not solve my issue).
I like to understand how things work before I fix them so if anybody knowledgeable on how snaps work can shed some light onto what's really happening, I'd greatly appreciate it...
P.S. running "snap install / snap remove" seems to work, it's the snap-store application that seems to have this problem.