To share the data to a LXD container, you must set the UID and GID to 100000. In the container it will be the id from root (0).
chown -R 100000:100000 /srv/shared
Now you can connect the shared folder:
lxc config device add mycontainer shared disk path=/srv/shared source=/srv/shared