If I add the appropriate comments as config items, after the container is created, then the sharing between Container and Host works fine.
$lxc config device add u5 home disk source=/home/john/shared path=/home/jradxl5/shared
$printf “uid $(id -u) 1005\ngid $(id -g) 1005” | lxc config set u5 raw.idmap
$ lxc restart u5
Remapping container filesystem
if I try to add the entries into a Profile, then cloud-init carries out it’s tasks in an inconvenient order, and it does not work. (i.e, the myshared1 path is created as root) Here is an excerpt of the Profile (formating ignored)
$lxc profile show profile4
- name: jradxl1
both 1000 1001
Am I doing anything wrong?
Is there a better method?
lxd version 3.7, snap version