[lxc-users] lxc-attach when init is non root.

Serge E. Hallyn serge at hallyn.com
Tue May 23 14:11:27 UTC 2017

On Tue, May 23, 2017 at 01:11:42PM +0530, Adithya K wrote:
> Hi All,
>  I am facing one issue. I am using lxc 1.0.8 version. Init inside container
> is running as non root(it is running with uid 1). When init is running as

Did it just setuid to that as soon as it started?  Is the container in a
non-init user namespace?  If so, does it have a mapping for uid 0?

> non root, then lxc-attach stops working. It just returns and doesn't throw
> any error also.
>  Any solution to the problem.


it's possible

Can you do

	lxc-attach -l trace -o log -n containername -- ps

(or some command that exists in the container)

and show the contents of the created file 'log'?

Then also

	strace -f -ostrace.log -- lxc-attach -n containername -- ps

and show the strace.log file contents.

More information about the lxc-users mailing list