unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Ivan Vilata i Balaguer <ivan@selidor.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 37967@debbugs.gnu.org, Ivan Vilata i Balaguer <ivan@selidor.net>
Subject: bug#37967: guix environment -CN: Operation not permitted mounting host's /var/run/nscd
Date: Fri, 1 Nov 2019 11:10:02 -0400	[thread overview]
Message-ID: <20191101151002.GE17621@sax.terramar.selidor.net> (raw)
In-Reply-To: <87v9s3brl8.fsf@gnu.org>

Ludovic Courtès (2019-11-01 15:26:27 +0100) wrote:

> Ivan Vilata i Balaguer <ivan@selidor.net> skribis:
> 
> > Ludovic Courtès (2019-10-29 23:16:49 +0100) wrote:
> >> 
> >> Ivan Vilata i Balaguer <ivan@selidor.net> skribis:
> >> 
> >> > Hi!  While using Guix commit `c9fc03a3` on Debian unstable, whenever I run
> >> > `guix environment -CN` (either as a normal user or as root) I get an error
> >> > like this:
> >> >
> >> >     guix environment: error: mount: mount "/var/run/nscd" on "/tmp/guix-directory.6kBgXe//var/run/nscd": Operation not permitted
> >> >
> >> > nscd is installed and working in my host machine.
> >> 
> >> What does ‘uname -rs’ return?
> >
> >     $ uname -rs
> >     Linux 5.2.0-3-amd64
> >
> >> What about ‘ls -ld /var/run/nscd’?
> >
> >     $ ls -ld /var/run/nscd
> >     drwxr-xr-x 2 root root 60 Oct 29 15:58 /var/run/nscd
> 
> Hmm, what does this command return:
> 
>   mkdir /tmp/tt
>   unshare -mUr mount --bind /var/run/nscd /tmp/tt
> 
> ?

    $ mkdir /tmp/tt
    $ unshare -mUr mount --bind /var/run/nscd /tmp/tt && echo ok
    ok

> What about a read-only bind mount like this:
> 
>   unshare -mUr mount --bind -o ro /var/run/nscd /tmp/tt
> 
> ?

This one looks more interesting:

    $ unshare -mUr mount --bind -o ro /var/run/nscd /tmp/tt && echo ok
    mount: /tmp/tt: filesystem was mounted, but any subsequent operation failed: Unknown error 5005.
    $ echo $?
    32

> What if you try bind-mounting a directory owned by your user?
> 
>   mkdir /tmp/mine
>   unshare -mUr mount --bind /tmp/mine /tmp/tt
> 
> ?

    $ mkdir /tmp/mine
    $ unshare -mUr mount --bind /tmp/mine /tmp/tt && echo ok
    ok

> Thanks in advance,
> Ludo’.

Thanks to you!  Saluton,

-- 
Ivan Vilata i Balaguer -- https://elvil.net/

  reply	other threads:[~2019-11-01 15:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28 17:27 bug#37967: guix environment -CN: Operation not permitted mounting host's /var/run/nscd Ivan Vilata i Balaguer
2019-10-29 22:16 ` Ludovic Courtès
2019-10-29 22:47   ` Ivan Vilata i Balaguer
2019-11-01 14:26     ` Ludovic Courtès
2019-11-01 15:10       ` Ivan Vilata i Balaguer [this message]
2019-11-04  3:23         ` Ivan Vilata i Balaguer
2019-11-04 17:07           ` Ludovic Courtès
2019-11-04 21:23             ` Ivan Vilata i Balaguer
2019-11-04 22:37               ` Ludovic Courtès
2019-11-08 19:07                 ` Björn Höfling

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20191101151002.GE17621@sax.terramar.selidor.net \
    --to=ivan@selidor.net \
    --cc=37967@debbugs.gnu.org \
    --cc=ludo@gnu.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).