[lxc-users] Failing to create unprivileged container due to wrong /run/user/XXX/lock directory

Serge Hallyn serge.hallyn at ubuntu.com
Mon Jan 5 16:12:44 UTC 2015


Quoting Ranjib Dey (dey.ranjib at gmail.com):
> 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

What is go's homedir supposed to be?  What is $HOME actually?  What
is the full output of 'env'?

-serge


More information about the lxc-users mailing list