Hi list, Im trying to create an unprivileged container on ubuntu 14.04 with lxc 1.0.6. The user(named `go`) which will create containers is a CI agent (GoCD, its like jenkins). After installing the CI software, i am manually adding subuid and subgid using the usermod -a -g file. I have also created the appropriate /etc/lxc/lxc-usernet and othet configurations. When i try to create a container from the download template it fails. The first error shows that it tries to create a lock directory in a folder owned by wrong user. Note, my login user is different, and im using `sudo su - go` to become the user. I tried doing the cgm trick as well (cgm create all .., cgm chown all ..), without much luck.
go@host01:~$ lxc-create -o test.log -l debug -n test -t download -- -d ubuntu -a amd64 -r trusty lxc-create: Permission denied - failed to create directory '/run/user/1001/lock/' WARN: could not reopen tty: Permission denied WARN: could not reopen tty: Permission denied WARN: could not reopen tty: Permission denied lxc-create: Error opening /tmp/111/lxc//var/go/.local/share/lxc/test lxc-create: failed to save starting configuration for test lxc-create: Error creating container test Following is the content of the test.log lxc-create 1419737316.440 ERROR lxc_utils - Permission denied - failed to create directory '/run/user/1001/lock/' lxc-create 1419737316.440 WARN lxc_log - lxc_log_init called with log already initialized lxc-create 1419737316.440 INFO lxc_confile - read uid map: type u nsid 0 hostid 3311264 range 65537 lxc-create 1419737316.440 INFO lxc_confile - read uid map: type g nsid 0 hostid 3311264 range 65537 lxc-create 1419737316.562 ERROR lxc_lock - Error opening /tmp/111/lxc//var/go/.local/share/lxc/test lxc-create 1419737316.563 ERROR lxc_container - failed to save starting configuration for test lxc-create 1419737316.563 ERROR lxc_create_ui - Error creating container test lxc-create 1419737772.411 ERROR lxc_utils - Permission denied - failed to create directory '/run/user/1001/lock/' lxc-create 1419737772.411 WARN lxc_log - lxc_log_init called with log already initialized lxc-create 1419737772.412 INFO lxc_confile - read uid map: type u nsid 0 hostid 3311264 range 65537 lxc-create 1419737772.412 INFO lxc_confile - read uid map: type g nsid 0 hostid 3311264 range 65537 lxc-create 1419737772.544 ERROR lxc_lock - Error opening /tmp/111/lxc//var/go/.local/share/lxc/test lxc-create 1419737772.544 ERROR lxc_container - failed to save starting configuration for test lxc-create 1419737772.545 ERROR lxc_create_ui - Error creating container test go@host01:~$ ls -alh /run/user/ total 0 drwxr-xr-x 6 root root 120 Dec 28 03:02 . drwxr-xr-x 28 root root 940 Dec 28 03:02 .. drwx------ 2 ranjib ranjib 40 Dec 28 02:58 1001 drwx------ 2 newrelic newrelic 40 Dec 28 02:57 109 drwx------ 2 go go 40 Dec 28 02:57 111
_______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users