First we need to find the user ID of the container's user.
LXD might be installed in one of two ways. You can tell which, by running:
$ which lxc
/usr/bin/lxc # This means it's installed as a deb
# OR
/snap/bin/lxc # This means it's installed as a snap