mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aleksa Sarai <asarai@suse.de>
To: Enrico Weigelt <lkml@metux.net>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linux Containers <containers@lists.linux-foundation.org>
Subject: Re: plan9 semantics on Linux - mount namespaces
Date: Wed, 14 Feb 2018 15:54:42 +1100	[thread overview]
Message-ID: <20180214045442.jyv6zpbwz5glzi4z@gordon> (raw)
In-Reply-To: <39b08c53-3449-3164-c1b1-44ac587dd4ea@metux.net>

[-- Attachment #1: Type: text/plain, Size: 1210 bytes --]

On 2018-02-14, Enrico Weigelt <lkml@metux.net> wrote:
> On 13.02.2018 22:27, Aleksa Sarai wrote:
> 
> > You can do this by creating a new user namespace (CLONE_NEWUSER), which
> > then gives you the required permissions to create other namespaces
> > (CLONE_NEWNS). This is how "rootless containers" or unprivileged
> > containers operate.
> 
> hmm, unshare -U doesn't work for me (even as root). But docker works,
> so user namespaces should be working. Any idea what could be wrong ?

It depends how old your kernel is and what distro you use. Arch Linux
disables user namespaces entirely, Debian requires that you set a sysctl
to enable unprivileged user namespaces, and RHEL requires you to set
both a sysctl and a kernel boot-flag. Also check how old your kernel is
(unprivileged user namespace support was added in 3.8).

Also Docker doesn't use user namespaces by default (you need to manually
enable it with --userns-remap, check the docs for more details). You
probably also want to be using "unshare -r" in your testing (as "unshare
-U" will leave you without mapped users).

-- 
Aleksa Sarai
Senior Software Engineer (Containers)
SUSE Linux GmbH
<https://www.cyphar.com/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-02-14  4:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-13 22:12 Enrico Weigelt
2018-02-13 22:19 ` Enrico Weigelt
2018-02-13 22:27   ` Aleksa Sarai
2018-02-14  0:01     ` Enrico Weigelt
2018-02-14  4:54       ` Aleksa Sarai [this message]
2018-02-14 10:18         ` Enrico Weigelt
2018-02-14 10:24           ` Aleksa Sarai
2018-02-14 11:27             ` Enrico Weigelt
2018-02-14 11:30               ` Richard Weinberger
2018-02-14 12:38                 ` Enrico Weigelt
2018-02-14 12:53                   ` Richard Weinberger
2018-02-14 14:03                     ` Enrico Weigelt
2018-02-14 14:19                       ` Richard Weinberger
2018-02-14 15:02                         ` Enrico Weigelt
2018-02-14 15:17                           ` Richard Weinberger
2018-02-14 17:21                             ` Enrico Weigelt
2018-02-14 17:50                               ` Richard Weinberger
2018-02-14 18:01                                 ` Enrico Weigelt
2018-02-14 18:12                                   ` Richard Weinberger
2018-02-14 18:32                                     ` Enrico Weigelt
2018-02-14 20:39                               ` Aleksa Sarai
2018-02-16 18:26   ` Eric W. Biederman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180214045442.jyv6zpbwz5glzi4z@gordon \
    --to=asarai@suse.de \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml@metux.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®