On LXD 3.12, I think the container appear to be in unprivileged and I won’t need to manually set gid and uid unless I’m using lxc-attach command?
:~$ lxc config show c1
config:
image.architecture: amd64
image.description: Ubuntu bionic amd64 (20190420_08:55)
image.os: Ubuntu
image.release: bionic
image.serial: "20190420_08:55"
security.privileged: "false"
...
volatile.idmap.base: "0"
volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.power: RUNNING
On the output with ps fauxww | less
indicates UIDs 100000 is an unprivileged where as the [lxc monitor]
is run by LXD daemon as root is normal?
root 24189 0.0 0.0 309604 6832 ? Ss 15:21 0:00 [lxc monitor] /var/snap/lxd/common/lxd/containers c1
1000000 24205 0.2 0.0 224568 5608 ? Ss 15:21 0:00 \_ /sbin/init
1000000 24336 0.1 0.0 78480 7196 ? Ss 15:21 0:00 \_ /lib/systemd/systemd-journald
1000000 24342 0.0 0.0 42108 2240 ? Ss 15:21 0:00 \_ /lib/systemd/systemd-udevd
1000100 24355 0.0 0.0 80040 3840 ? Ss 15:21 0:00 \_ /lib/systemd/systemd-networkd
1000101 24384 0.0 0.0 70624 4116 ? Ss 15:21 0:00 \_ /lib/systemd/systemd-resolved
1000102 24386 0.0 0.0 193400 2680 ? Ssl 15:21 0:00 \_ /usr/sbin/rsyslogd -n
1000103 24387 0.0 0.0 49928 2500 ? Ss 15:21 0:00 \_ /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
1000000 24390 0.0 0.0 62016 3644 ? Ss 15:21 0:00 \_ /lib/systemd/systemd-logind
1000000 24391 0.0 0.0 31292 1736 ? Ss 15:21 0:00 \_ /usr/sbin/cron -f
1000000 24392 0.1 0.1 170360 13404 ? Ssl 15:21 0:00 \_ /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
1000000 24397 0.0 0.0 15956 1364 pts/0 Ss+ 15:21 0:00 \_ /sbin/agetty -o -p -- \u --noclear --keep-baud console 115200,38400,9600 linux