<div dir="ltr"><div><div>I have tried this but for some reason I am having trouble.<br><br></div>I have pastebins for my systemd unit file and the bash script it calls.<br><a href="http://pastebin.com/FLtLWaih">http://pastebin.com/FLtLWaih</a><br><a href="http://pastebin.com/b9qM2a9J">http://pastebin.com/b9qM2a9J</a><br><br></div>It appears as though it succesfully creates the cgroup "me", i see it, and i own it and have seemingly correct permission to it. But as my normal user I cannot move the current tty to that cgroup. I cannot even do it as root!<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 6, 2015 at 1:14 AM, Xavier Gendre <span dir="ltr"><<a href="mailto:gendre.reivax@gmail.com" target="_blank">gendre.reivax@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">Le 06/10/2015 06:03, Paul Jones a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi.<br>
<br>
I'm using Debian Stretch. And I would like to use unpriviledged containers.<br>
<br>
It seems by default, there is one cgroup owned by root. In order to<br>
start an unpriviledged container I need to create a new cgroup, chown it<br>
to the unpriviledged user and then move the current tty process into<br>
that cgroup. Then start the container from there.<br>
<br>
If this is the case, how will it be possible to autostart containers on<br>
boot?<br>
<br>
Or am I going about this all wrong?<br>
</blockquote>
<br></div></div>
Hi Paul,<br>
<br>
to start an unprivileged container on boot, you run some steps similar to what you describe but in a script that you call through a systemd service.<br>
<br>
Here are the step i do:<br>
- set clone_children to 1<br>
- create a dedicated cgroup and give it to my user<br>
- start the container<br>
<br>
Xavier<br>
_______________________________________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org" target="_blank">lxc-users@lists.linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Time To Get an EKG, G!</div>
</div>