i have an NFS mount on the host (which is shared from a freenas server) and which is working fine. the uid/gid on the host is 146:146.
i want to make this accessible on the container & don’t want to use privileged container and if i simply do:
lxc config device add disk source=/path/to/nfs-on-host path=/path/on/container
then i get the expected problem of the path on the container showing up with nobody:nogroup.
i tried to use a raw.idmap:
printf “uid 146 132\ngid 146 139” | lxc config set pvr raw.idmap -
which worked syntactically, but rendered the container inaccessible:
Error: Common start logic: Failed to change ACLs on /var/snap/lxd/common/lxd/storage-pools/ssdpool/containers/pvr/rootfs/var/log/journal
lxc info --show-log pvr for more info
and output of lxc info --show-log pvr:
Created: 2020/05/30 21:10 UTC
lxc pvr 20200601174457.897 WARN cgfsng - cgroups/cgfsng.c:mkdir_eexist_on_last:1152 - File exists - Failed to create directory “/sys/fs/cgroup/cpuset//lxc.monitor.pvr”
lxc pvr 20200601174457.898 WARN cgfsng - cgroups/cgfsng.c:mkdir_eexist_on_last:1152 - File exists - Failed to create directory “/sys/fs/cgroup/cpuset//lxc.payload.pvr”
lxc pvr 20200601174457.902 WARN cgfsng - cgroups/cgfsng.c:fchowmodat:1572 - No such file or directory - Failed to fchownat(17, memory.oom.group, 1000000000, 0, AT_EMPTY_PATH | AT_SYMLINK_NOFOLLOW )
uid 146, gid 146 on the host have the same username and group name as uid 132 gid 139 on the container.
The permissions of the shared folder in the container show up as 644 (EDIT - that should be 755) - & both the ubuntu user as well as the user with uid/gid of 132/139 can both read and write to the shared folder and it’s subfolders, so maybe i don’t need to make any further adjustments?
What would be the correct way to do the id mapping? ubuntu 20 and lxd is installed via snap.
thanks in advance for any help.