Re: непривелигерованный контейнер lxc в бустер

Maxim Nikulin <[email protected]>
Newsgroups gmane.linux.debian.user.russian
Message-ID <[email protected]>
On 10/02/2021 01:11, Sergey Spiridonov wrote:
> 
> $ cat  /etc/s*id|grep lxcuser
> lxcuser:296608:65536
> lxcuser:296608:65536
> 
> Но...
> 
> $ lxc-create -n cname -t debian -- -r buster
> lxc-create: cname: conf.c: chown_mapped_root: 3250 lxc-usernsexec failed: Permission denied - Failed to open tt
> lxc-create: cname: tools/lxc_create.c: main: 327 Failed to create container cname

Перелогиньтесь... Это на случай, если сессия живет дольше, чем записи в 
/etc/subuid, subgid.

> $ lxc-usernsexec
> Failed to find subuid or subgid allocation

Что стоит на хосте не указано, а старые версии не понимали user name (не 
UID) в /etc/subuid. Я бы попробовал явно

lxc-usernsexec -m b:0:296608:65536 -- bash

Еще вроде есть заморочка с версией lxc и тем, какие cgroups (гибридные 
или вторые) включены на хосте. Попадалось, что вроде для cgroups v2 
libpam-cgfs и lxcfs не работают, но может тогда они и не нужны.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.