Lxc init ubuntu:22.04 c1 results in "cannot open path of the current working directory: Permission denied"

Since I have root access on this system, this isn’t a tragedy, but I’m trying to understand what’s going on.

Bare metal: Ubuntu 18.04
My account: from LDAP
My homedir automount: /u/pgoetz

# snap install lxd --channel=latest/stable
# lxd init

Just went with all the defaults except zfs → dir

I added my username to the LXD group, logged out, and logged back in. However, when I try to create a new container:

pgoetz@finglas ~$ lxc init ubuntu:22.04 apptainer-build
cannot open path of the current working directory: Permission denied

This all works on several other systems I work with, with most of the details the same (well, the others are 20.04/22.04 bare metal installs), so I’m assuming this is an issue (like the last time I asked a similar question) with apparmor and the location of my home directory? But since I’m presumably trying to create a container in /var/snap/lxd, I’m not sure what my home directory has to do with it.

Any ideas? I’m planning on rolling out user-accessible container solutions at some point, so need to get these issues ironed out. And yes, I’m trying to use an LXD container to build apptainer. <:)

Hmpf. I didn’t update anything on this system, and it’s been less than a day since I tried to initialize this container, but now the error message has magically changed:

pgoetz@finglas lxd$ lxc init ubuntu:22.04 apptainer-build
Sorry, home directories outside of /home needs configuration.
See https://forum.snapcraft.io/t/11209 for details.

Would love to know how this happened.

I wonder if snap refreshed itself and now checks this?

Are you able to reproduce the original error?

Not sure, but now it’s back to the previous error message:

pgoetz@finglas ~$ lxc init ubuntu:22.04 apptainer-build
cannot open path of the current working directory: Permission denied

While I view forcing the use of Snap as Canonical’s latest attempt to alienate their users, it looks like there is now a solution to this problem:

https://snapcraft.io/docs/home-outside-home

However, not on Ubuntu 18.04:

pgoetz@finglas ~$ dpkg -l | grep snapd
ii  snapd          2.58+18.04          amd64          Daemon and tooling that enable snap packages