Cannot perform operation: mount --rbind /root /tmp/snap.rootfs_GIHlMA//root: Permission denied

Hi,
I’m using Ubuntu 20.04 and can’t use any snap packages. I had the same issue with 19.10 and hoped the LTS release would have addressed the issue. Whenever I try to run a program installed from Ubuntu Software I keep getting messages like:
cannot perform operation: mount --rbind /root /tmp/snap.rootfs_GIHlMA//root: Permission denied
I’ve googled the issue for quite some time and it keeps coming back to where my home directory is, but that makes no sense.
My home directory is /home/arthur
/ is mounted on /dev/sda1
/home is mounted on /dev/sda2

The relevant fstab entries are:

UUID=aa29d5d6-1ed5-4c24-8a66-38667ac9e7ed /               ext4    errors=remount-ro 0       1
UUID=59b2eb44-b903-4795-9e35-94a13dfcd0db /home	ext4	user,errors=remount-ro,auto,exec,rw

and here is the relevant output from df

/dev/sda1                   119133984   49336548   63676068  44% /
/dev/sda2                   119366868   93614140   19646156  83% /home

Seems like a normal setup, but I can’t figure out what else could be causing this.
Does anyone have any ideas?

Thank you.

what is the full output of:

snap version
snap    2.44.3+20.04
snapd   2.44.3+20.04
series  16
ubuntu  20.04
kernel  5.4.12-050412-lowlatency

that does not look like an ubuntu kernel, does it work if you switch to an officially supported kernel package ?

Looks like a Kernel Team “PPA” mainline kernel from https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4.12/
They’re completely unsupported. Don’t use them.

Unsupported or not, please attach the output of the following commands:

  • snap debug sandbox-features
  • SNAPD_DEBUG=1 SNAP_CONFINE_DEBUG=1 snap run <any-snap-app>

Seen a similar request on askubuntu. Got debug information in case it’s useful.

https://askubuntu.com/q/1240898/612

Hello everyone,

Thank you so much for your help trying to solve this for me.
After I posted my issue I googled some more and found a little tidbit I hadn’t come across before.
It mentioned something about using the mount system for /root.
My /root was a symlink to /home/root. I rsync’ed the contents to another directory on another partition I removed the symlink and created a mount entry in /etc/fstab:
/data/home/root /root none rbind
Now my snaps are working.
The full thread where I got this from is here: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1729576 the comment in question is #13.
Thank you again for your help.

Oh and the reason for the unusual kernel was that I had terribly garbled sound with the original kernel. I noticed that there was an update and even that is fine now.
snap update shows
snap 2.44.3+20.04
snapd 2.44.3+20.04
series 16
ubuntu 20.04
kernel 5.4.0-29-lowlatency

2 Likes