All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@canonical.com>
To: Alexey Naidyonov <alexey.naidyonov@gmail.com>
Cc: linux-unionfs@vger.kernel.org
Subject: Re: overlayfs + linux user namespace issue
Date: Thu, 24 Sep 2015 12:16:32 +0100	[thread overview]
Message-ID: <20150924111632.GA19632@bark> (raw)
In-Reply-To: <CAM45rib8eDrSkRwXo+0ZhannWNmyUe1Tqq9T13csGVdfWXbwXw@mail.gmail.com>

On Thu, Sep 24, 2015 at 01:43:23PM +0300, Alexey Naidyonov wrote:
> Hello;
> 
> I found that writing to overlayfs mount may be denied to a process
> with own user namespace and uid=0 inside that namespace, unless I
> explicitly chown lower-work/work directory to a parent namespace uid
> corresponding to that user namespace uid 0.
> 
> The test case might be found at
> https://unix.stackexchange.com/questions/229782/overlayfs-doesnt-work-with-unprivileged-user-namespace
> 
> Tried with debian's 4.1.6 and 4.2-trunk.
> 
> Could someone please clarify if this is a bug or a feature, and if
> this might be changed in future?

Which directory are you saying must belong to namespace root here?
You should not be able to read things in the underlay that the namespace
root could not read, and not write to overlay directories that your
namepsace root cannot write.  If you could you could copy up protected
files into an overlay by specifying a protected underlay (think ~/over
overlaying on /etc) or overwrite profiled files by specifying a protected
overlay (think ~/under overlayed by /etc).

-apw

  reply	other threads:[~2015-09-24 11:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-24 10:43 overlayfs + linux user namespace issue Alexey Naidyonov
2015-09-24 11:16 ` Andy Whitcroft [this message]
2015-09-25  8:54   ` Alexey Naidyonov

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=20150924111632.GA19632@bark \
    --to=apw@canonical.com \
    --cc=alexey.naidyonov@gmail.com \
    --cc=linux-unionfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.