GNU bug report logs - #37967
guix environment -CN: Operation not permitted mounting host's /var/run/nscd

Previous Next

Package: guix;

Reported by: Ivan Vilata i Balaguer <ivan <at> selidor.net>

Date: Mon, 28 Oct 2019 17:29:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 37967 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Vilata i Balaguer <ivan <at> selidor.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 37967 <at> debbugs.gnu.org, Ivan Vilata i Balaguer <ivan <at> selidor.net>
Subject: Re: bug#37967: guix environment -CN: Operation not permitted
 mounting host's /var/run/nscd
Date: Fri, 1 Nov 2019 11:10:02 -0400
Ludovic Courtès (2019-11-01 15:26:27 +0100) wrote:

> Ivan Vilata i Balaguer <ivan <at> selidor.net> skribis:
> 
> > Ludovic Courtès (2019-10-29 23:16:49 +0100) wrote:
> >> 
> >> Ivan Vilata i Balaguer <ivan <at> 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/




This bug report was last modified 5 years and 282 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.