Allow snap access to nfs mounts

I’m also interested in this topic - I’m trying to set up a remote boot Raspberry PI with Ubuntu on a NFS root partition - everything works fine until I try to install MicroK8s and I get this error in the shell: ubuntu@node1:~$ sudo snap install microk8s --classic error: cannot perform the following tasks:

  • Run install hook of “microk8s” snap if present (run hook “install”: /snap/snapd/14063/usr/lib/snapd/snap-confine: error while loading shared libraries: libudev.so.1: cannot open shared object file: Permission denied)

And this in the audit log: type=AVC msg=audit(1637626645.144:441): apparmor=“DENIED” operation=“sendmsg” profile="/snap/snapd/14063/usr/lib/snapd/snap-confine" pid=7307 comm=“snap-confine” laddr=xxxx lport=873 faddr=xxxx fport=2049 family=“inet” sock_type=“stream” protocol=6 requested_mask=“send” denied_mask=“send”

I found some articles online about adding ‘network, inet’ the profile but the profile keeps getting overwritten and I haven’t figured out which process is doing that yet