From: Richard Weinberger <richard@sigma-star.at>
To: Enrico Weigelt <lkml@metux.net>, Aleksa Sarai <asarai@suse.de>
Cc: Linux Containers <containers@lists.linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: plan9 semantics on Linux - mount namespaces
Date: Wed, 14 Feb 2018 13:53:40 +0100 [thread overview]
Message-ID: <2658681.ustYaP9yci@blindfold> (raw)
In-Reply-To: <4864d279-9a3f-eaf4-c297-ea34be604e41@metux.net>
Enrico,
Am Mittwoch, 14. Februar 2018, 13:38:48 CET schrieb Enrico Weigelt:
> On 14.02.2018 12:30, Richard Weinberger wrote:
> > On Wed, Feb 14, 2018 at 12:27 PM, Enrico Weigelt <lkml@metux.net> wrote:
> >> On 14.02.2018 11:24, Aleksa Sarai wrote:
> >>> What distribution are you using and which release?
> >>
> >> On a self-compiled system.
> >>
> >> Forgot to enable namespaces in the kernel. Now it seems to work
> >> as root, but not as an unprivileged user:
> >>
> >>
> >> daemon@alphabox:~ unshare -r -U
> >> unshare: can't open '/proc/self/setgroups': Permission denied
> >> daemon@alphabox:~ unshare -f -r -U
> >> unshare: can't open '/proc/self/setgroups': Permission denied
> >
> > Please read http://man7.org/linux/man-pages/man7/user_namespaces.7.html
> > setgroups is a corner case and needs special care.
>
> I'm still confused. Does the unshare program do something wrong here ?
It does what you ask it for.
Also see the --setgroups switch.
AFAICT --setgroups=deny is the new default, then your command line should just
work. Maybe your unshare tool is too old.
> Anyways, I doubt that user namespaces help solving my problem.
>
> What I'd like to achieve is that processes can manipulate their private
> namespace at will and mount other filesystems (primarily 9p and fuse).
>
> For that, I need to get rid of setuid (and per-file caps) for these
> private namespaces.
This is exactly why we have the user namespace.
In the user namespace you can create your own mount namespace and do (almost)
whatever you want.
Please note that you cannot mount any kind of filesystem.
For FUSE, see https://lwn.net/Articles/684774/
Thanks,
//richard
--
sigma star gmbh - Eduard-Bodem-Gasse 6 - 6020 Innsbruck - Austria
ATU66964118 - FN 374287y
next prev parent reply other threads:[~2018-02-14 12:52 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-13 22:12 plan9 semantics on Linux - mount namespaces 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
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 [this message]
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=2658681.ustYaP9yci@blindfold \
--to=richard@sigma-star.at \
--cc=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