[lxc-users] Failing to create unprivileged container due to wrong /run/user/XXX/lock directory
Nicholas J Ingrassellino
nick at lifebloodnetworks.com
Sat Jan 3 17:14:37 UTC 2015
I am having the same issue.
After an
/sudo su - lxc/
I try using
/lxc-create/
. I get
/lxc-create: Permission denied - failed to create directory
'/run/user/1000/lock/'//
/
which is the uid of the "logged in" user. I am writing up instructions
to host a how-to on my blog and can not find any clues as to a solution.
------------------------------------------------------------------------
On 12/27/2014 10:54 PM, Ranjib Dey wrote:
> 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 at 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 at 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 at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20150103/96d71a0f/attachment.html>
More information about the lxc-users
mailing list