I have configured for namespaces for unprivileged LXC containers using this docuement
https://help.ubuntu.com/lts/serverguide/lxc.html#lxc-unpriv
I can create and start containers using lxc-create
and lxc-start
without using sudo.
But now I want to modify the container before starting it, but I cannot do it because rootfs is owned by user 100000:
vagrant@lxci-host:~$ ls -l $HOME/.local/share/lxc/u1/
total 8
-rw-rw-r-- 1 vagrant vagrant 616 Nov 22 12:38 config
drwxr-xr-x 21 100000 100000 4096 Nov 22 12:38 rootfs
How can I workaround this?
The container was created using this
lxc-create -t download -n u1 -- -d ubuntu -r trusty -a amd64