From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 28 13:28:44 2019 Received: (at submit) by debbugs.gnu.org; 28 Oct 2019 17:28:45 +0000 Received: from localhost ([127.0.0.1]:46315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iP8or-0007Vq-Ph for submit@debbugs.gnu.org; Mon, 28 Oct 2019 13:28:44 -0400 Received: from lists.gnu.org ([209.51.188.17]:55904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iP8oq-0007Vg-6I for submit@debbugs.gnu.org; Mon, 28 Oct 2019 13:28:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49642) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iP8on-00040m-IF for bug-guix@gnu.org; Mon, 28 Oct 2019 13:28:38 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iP8ol-0001qR-LO for bug-guix@gnu.org; Mon, 28 Oct 2019 13:28:37 -0400 Received: from lev.selidor.net ([66.246.138.156]:49601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iP8ol-0001pp-I2 for bug-guix@gnu.org; Mon, 28 Oct 2019 13:28:35 -0400 Received: from sax.terramar.selidor.net (unknown [IPv6:2600:3c03:e001:114e:713a:be39:95a7:16a7]) by lev.selidor.net (Postfix) with ESMTP id 69CB4CADA; Mon, 28 Oct 2019 17:28:34 +0000 (UTC) Received: by sax.terramar.selidor.net (Postfix, from userid 1000) id 90E8E9A6F80; Mon, 28 Oct 2019 13:27:41 -0400 (EDT) Date: Mon, 28 Oct 2019 13:27:41 -0400 From: Ivan Vilata i Balaguer To: bug-guix@gnu.org Subject: guix environment -CN: Operation not permitted mounting host's /var/run/nscd Message-ID: <20191028172741.GJ17570@sax.terramar.selidor.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.12.1 (2019-06-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.246.138.156 X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) 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. This command used to work a while ago. Actually, I pulled the Guix commit right before `5ccec771` ("file-systems: Add /var/run/nscd to '%network-file-mappings'.") and the command seems to work again (even if I do not replace the running daemon). Maybe the later commit introduced some kind of regression? Thanks and cheers! -- Ivan Vilata i Balaguer -- https://elvil.net/ From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 18:17:05 2019 Received: (at 37967) by debbugs.gnu.org; 29 Oct 2019 22:17:05 +0000 Received: from localhost ([127.0.0.1]:48712 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPZnU-0008Iw-Rj for submit@debbugs.gnu.org; Tue, 29 Oct 2019 18:17:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57473) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPZnR-0008IK-Mo for 37967@debbugs.gnu.org; Tue, 29 Oct 2019 18:17:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49057) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iPZnK-0002BI-Bv; Tue, 29 Oct 2019 18:16:54 -0400 Received: from [2a01:e0a:1d:7270:6a6c:dc17:fc02:cfda] (port=55750 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iPZnJ-0006fs-Pu; Tue, 29 Oct 2019 18:16:54 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ivan Vilata i Balaguer Subject: Re: bug#37967: guix environment -CN: Operation not permitted mounting host's /var/run/nscd References: <20191028172741.GJ17570@sax.terramar.selidor.net> Date: Tue, 29 Oct 2019 23:16:49 +0100 In-Reply-To: <20191028172741.GJ17570@sax.terramar.selidor.net> (Ivan Vilata i. Balaguer's message of "Mon, 28 Oct 2019 13:27:41 -0400") Message-ID: <87v9s7dwoe.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37967 Cc: 37967@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Bon dia Ivan, Ivan Vilata i Balaguer 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-d= irectory.6kBgXe//var/run/nscd": Operation not permitted > > nscd is installed and working in my host machine. What does =E2=80=98uname -rs=E2=80=99 return? What about =E2=80=98ls -ld /var/run/nscd=E2=80=99? > This command used to work a while ago. Actually, I pulled the Guix commit > right before `5ccec771` ("file-systems: Add /var/run/nscd to > '%network-file-mappings'.") and the command seems to work again (even if = I do > not replace the running daemon). > > Maybe the later commit introduced some kind of regression? It definitely has to do with this commit, but I wonder why you=E2=80=99d get EPERM when bind-mounting /var/run/nscd to a different place! Gracies, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 18:48:12 2019 Received: (at 37967) by debbugs.gnu.org; 29 Oct 2019 22:48:12 +0000 Received: from localhost ([127.0.0.1]:48724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPaHb-0000gn-Sb for submit@debbugs.gnu.org; Tue, 29 Oct 2019 18:48:12 -0400 Received: from lev.selidor.net ([66.246.138.156]:52359) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPaHY-0000gc-WF for 37967@debbugs.gnu.org; Tue, 29 Oct 2019 18:48:09 -0400 Received: from sax.terramar.selidor.net (unknown [IPv6:2600:3c03:e001:114e:794b:37be:c4bb:4dca]) by lev.selidor.net (Postfix) with ESMTP id 14051C83D; Tue, 29 Oct 2019 22:48:08 +0000 (UTC) Received: by sax.terramar.selidor.net (Postfix, from userid 1000) id 2C2709A6F84; Tue, 29 Oct 2019 18:47:14 -0400 (EDT) Date: Tue, 29 Oct 2019 18:47:14 -0400 From: Ivan Vilata i Balaguer To: Ludovic =?iso-8859-1?Q?Court=E8s?= Subject: Re: bug#37967: guix environment -CN: Operation not permitted mounting host's /var/run/nscd Message-ID: <20191029224714.GA17621@sax.terramar.selidor.net> References: <20191028172741.GJ17570@sax.terramar.selidor.net> <87v9s7dwoe.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87v9s7dwoe.fsf@gnu.org> User-Agent: Mutt/1.12.2 (2019-09-21) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37967 Cc: 37967@debbugs.gnu.org, Ivan Vilata i Balaguer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Salut Ludovic ! Ludovic Courtès (2019-10-29 23:16:49 +0100) wrote: > Bon dia Ivan, > > Ivan Vilata i Balaguer 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 > > This command used to work a while ago. Actually, I pulled the Guix commit > > right before `5ccec771` ("file-systems: Add /var/run/nscd to > > '%network-file-mappings'.") and the command seems to work again (even if I do > > not replace the running daemon). > > > > Maybe the later commit introduced some kind of regression? > > It definitely has to do with this commit, but I wonder why you’d get > EPERM when bind-mounting /var/run/nscd to a different place! > > Gracies, > Ludo’. Yeah, I'm also scratching my head since switching to the previous commit immediately has it working again, so it's probably not a system config issue. `O_o` Cheers! -- Ivan Vilata i Balaguer -- https://elvil.net/ From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 01 10:26:40 2019 Received: (at 37967) by debbugs.gnu.org; 1 Nov 2019 14:26:40 +0000 Received: from localhost ([127.0.0.1]:56754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQXst-0004Qp-Tx for submit@debbugs.gnu.org; Fri, 01 Nov 2019 10:26:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQXsr-0004QZ-UK for 37967@debbugs.gnu.org; Fri, 01 Nov 2019 10:26:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59320) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iQXsm-0004YA-7w; Fri, 01 Nov 2019 10:26:32 -0400 Received: from [2a01:e0a:1d:7270:6a6c:dc17:fc02:cfda] (port=58622 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iQXsk-0007ET-Lj; Fri, 01 Nov 2019 10:26:31 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ivan Vilata i Balaguer Subject: Re: bug#37967: guix environment -CN: Operation not permitted mounting host's /var/run/nscd References: <20191028172741.GJ17570@sax.terramar.selidor.net> <87v9s7dwoe.fsf@gnu.org> <20191029224714.GA17621@sax.terramar.selidor.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 11 Brumaire an 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 01 Nov 2019 15:26:27 +0100 In-Reply-To: <20191029224714.GA17621@sax.terramar.selidor.net> (Ivan Vilata i. Balaguer's message of "Tue, 29 Oct 2019 18:47:14 -0400") Message-ID: <87v9s3brl8.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37967 Cc: 37967@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ivan Vilata i Balaguer skribis: > Salut Ludovic=C2=A0! Hola! :-) > Ludovic Court=C3=A8s (2019-10-29 23:16:49 +0100) wrote: > >> Bon dia Ivan, >>=20 >> Ivan Vilata i Balaguer skribis: >>=20 >> > 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 e= rror >> > like this: >> > >> > guix environment: error: mount: mount "/var/run/nscd" on "/tmp/gui= x-directory.6kBgXe//var/run/nscd": Operation not permitted >> > >> > nscd is installed and working in my host machine. >>=20 >> What does =E2=80=98uname -rs=E2=80=99 return? > > $ uname -rs > Linux 5.2.0-3-amd64 > >> What about =E2=80=98ls -ld /var/run/nscd=E2=80=99? > > $ 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 ? What about a read-only bind mount like this: unshare -mUr mount --bind -o ro /var/run/nscd /tmp/tt ? What if you try bind-mounting a directory owned by your user? mkdir /tmp/mine unshare -mUr mount --bind /tmp/mine /tmp/tt ? Thanks in advance, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 01 11:11:01 2019 Received: (at 37967) by debbugs.gnu.org; 1 Nov 2019 15:11:01 +0000 Received: from localhost ([127.0.0.1]:56835 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQYZo-0007iv-Vk for submit@debbugs.gnu.org; Fri, 01 Nov 2019 11:11:01 -0400 Received: from lev.selidor.net ([66.246.138.156]:58833) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQYZl-0007ik-Hn for 37967@debbugs.gnu.org; Fri, 01 Nov 2019 11:10:59 -0400 Received: from sax.terramar.selidor.net (unknown [IPv6:2600:3c03:e001:114e:b029:6a28:83ac:1d43]) by lev.selidor.net (Postfix) with ESMTP id DD548C82F; Fri, 1 Nov 2019 15:10:56 +0000 (UTC) Received: by sax.terramar.selidor.net (Postfix, from userid 1000) id C4EB69A3757; Fri, 1 Nov 2019 11:10:02 -0400 (EDT) Date: Fri, 1 Nov 2019 11:10:02 -0400 From: Ivan Vilata i Balaguer To: Ludovic =?iso-8859-1?Q?Court=E8s?= Subject: Re: bug#37967: guix environment -CN: Operation not permitted mounting host's /var/run/nscd Message-ID: <20191101151002.GE17621@sax.terramar.selidor.net> References: <20191028172741.GJ17570@sax.terramar.selidor.net> <87v9s7dwoe.fsf@gnu.org> <20191029224714.GA17621@sax.terramar.selidor.net> <87v9s3brl8.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87v9s3brl8.fsf@gnu.org> User-Agent: Mutt/1.12.2 (2019-09-21) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37967 Cc: 37967@debbugs.gnu.org, Ivan Vilata i Balaguer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ludovic Courtès (2019-11-01 15:26:27 +0100) wrote: > Ivan Vilata i Balaguer skribis: > > > Ludovic Courtès (2019-10-29 23:16:49 +0100) wrote: > >> > >> Ivan Vilata i Balaguer 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/ From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 03 22:24:22 2019 Received: (at 37967) by debbugs.gnu.org; 4 Nov 2019 03:24:22 +0000 Received: from localhost ([127.0.0.1]:35706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRSyc-0007NZ-Cc for submit@debbugs.gnu.org; Sun, 03 Nov 2019 22:24:22 -0500 Received: from lev.selidor.net ([66.246.138.156]:57411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRSyb-0007NS-6X for 37967@debbugs.gnu.org; Sun, 03 Nov 2019 22:24:21 -0500 Received: from sax.terramar.selidor.net (unknown [IPv6:2600:3c03:e001:114e:b029:6a28:83ac:1d43]) by lev.selidor.net (Postfix) with ESMTP id 9451DC88F; Mon, 4 Nov 2019 03:24:20 +0000 (UTC) Received: by sax.terramar.selidor.net (Postfix, from userid 1000) id 618509A3757; Sun, 3 Nov 2019 22:23:24 -0500 (EST) Date: Sun, 3 Nov 2019 22:23:24 -0500 From: Ivan Vilata i Balaguer To: Ivan Vilata i Balaguer Subject: Re: bug#37967: guix environment -CN: Operation not permitted mounting host's /var/run/nscd Message-ID: <20191104032324.GG17621@sax.terramar.selidor.net> References: <20191028172741.GJ17570@sax.terramar.selidor.net> <87v9s7dwoe.fsf@gnu.org> <20191029224714.GA17621@sax.terramar.selidor.net> <87v9s3brl8.fsf@gnu.org> <20191101151002.GE17621@sax.terramar.selidor.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191101151002.GE17621@sax.terramar.selidor.net> User-Agent: Mutt/1.12.2 (2019-09-21) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37967 Cc: Ludovic =?iso-8859-1?Q?Court=E8s?= , 37967@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ivan Vilata i Balaguer (2019-11-01 11:10:02 -0400) wrote: > Ludovic Courtès (2019-11-01 15:26:27 +0100) wrote: > > > […] 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 BTW, I ran that under strace and it looks like the read-only remount fails after mounting `/var/run/nscd` in the new namespace has succeeded: $ strace -f unshare -mUr mount --bind -o ro /var/run/nscd /tmp/tt […] access("/run/mount", R_OK|W_OK) = -1 EACCES (Permission denied) mount("/run/nscd", "/tmp/tt", 0x14c25b0, MS_RDONLY|MS_BIND, NULL) = 0 mount("none", "/tmp/tt", NULL, MS_RDONLY|MS_REMOUNT|MS_BIND, NULL) = -1 EPERM (Operation not permitted) write(2, "mount: ", 7mount: ) = 7 write(2, "/tmp/tt: filesystem was mounted,"..., 89/tmp/tt: filesystem was mounted, but any subsequent operation failed: Unknown error 5005.) = 89 write(2, "\n", 1 […] Cheers! -- Ivan Vilata i Balaguer -- https://elvil.net/ From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 04 12:07:16 2019 Received: (at 37967) by debbugs.gnu.org; 4 Nov 2019 17:07:16 +0000 Received: from localhost ([127.0.0.1]:37448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRfox-0002bQ-SD for submit@debbugs.gnu.org; Mon, 04 Nov 2019 12:07:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRfow-0002bB-Uh for 37967@debbugs.gnu.org; Mon, 04 Nov 2019 12:07:15 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33618) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iRfor-0007QI-6C; Mon, 04 Nov 2019 12:07:09 -0500 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=42066 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iRfoq-00042a-Hy; Mon, 04 Nov 2019 12:07:09 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ivan Vilata i Balaguer Subject: Re: bug#37967: guix environment -CN: Operation not permitted mounting host's /var/run/nscd References: <20191028172741.GJ17570@sax.terramar.selidor.net> <87v9s7dwoe.fsf@gnu.org> <20191029224714.GA17621@sax.terramar.selidor.net> <87v9s3brl8.fsf@gnu.org> <20191101151002.GE17621@sax.terramar.selidor.net> <20191104032324.GG17621@sax.terramar.selidor.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 14 Brumaire an 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 04 Nov 2019 18:07:05 +0100 In-Reply-To: <20191104032324.GG17621@sax.terramar.selidor.net> (Ivan Vilata i. Balaguer's message of "Sun, 3 Nov 2019 22:23:24 -0500") Message-ID: <87y2wv8tae.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37967 Cc: 37967@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Saluton! Ivan Vilata i Balaguer skribis: > Ivan Vilata i Balaguer (2019-11-01 11:10:02 -0400) wrote: > >> Ludovic Court=C3=A8s (2019-11-01 15:26:27 +0100) wrote: >>=20 >> > [=E2=80=A6] What about a read-only bind mount like this: >> >=20 >> > unshare -mUr mount --bind -o ro /var/run/nscd /tmp/tt >> >=20 >> > ? >>=20 >> This one looks more interesting: >>=20 >> $ 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 > > BTW, I ran that under strace and it looks like the read-only remount fails > after mounting `/var/run/nscd` in the new namespace has succeeded: > > $ strace -f unshare -mUr mount --bind -o ro /var/run/nscd /tmp/tt > [=E2=80=A6] > access("/run/mount", R_OK|W_OK) =3D -1 EACCES (Permission den= ied) > mount("/run/nscd", "/tmp/tt", 0x14c25b0, MS_RDONLY|MS_BIND, NULL) =3D= 0 > mount("none", "/tmp/tt", NULL, MS_RDONLY|MS_REMOUNT|MS_BIND, NULL) = =3D -1 EPERM (Operation not permitted) > write(2, "mount: ", 7mount: ) =3D 7 > write(2, "/tmp/tt: filesystem was mounted,"..., 89/tmp/tt: filesystem= was mounted, but any subsequent operation failed: Unknown error 5005.) =3D= 89 > write(2, "\n", 1 > [=E2=80=A6] Weird, why does it remount it? What does: mount | grep /run returns? I just tried on a Debian 10 image with Linux 4.19.0 and /run is a tmpfs, which may be the reason why read-only bind-mounts fail (or at least there=E2=80=99s a bug in that area.) Anyway, below is a patch for you to test. Let me know how it goes. :-) Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm index 6cf6ccc53e..6cdb2b749d 100644 --- a/gnu/system/file-systems.scm +++ b/gnu/system/file-systems.scm @@ -507,7 +507,8 @@ a bind mount." ;; XXX: On some GNU/Linux systems, /etc/resolv.conf is a ;; symlink to a file in a tmpfs which, for an unknown reason, ;; cannot be bind mounted read-only within the container. - (writable? (string=? file "/etc/resolv.conf")))) + (writable? (or (string=? file "/etc/resolv.conf") + (string=? file "/var/run/nscd"))))) (cons "/var/run/nscd" %network-configuration-files))) (define (file-system-type-predicate type) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 04 16:24:11 2019 Received: (at 37967) by debbugs.gnu.org; 4 Nov 2019 21:24:11 +0000 Received: from localhost ([127.0.0.1]:37633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRjpa-0005Dm-Ni for submit@debbugs.gnu.org; Mon, 04 Nov 2019 16:24:11 -0500 Received: from lev.selidor.net ([66.246.138.156]:57363) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRjpY-0005Dc-EH for 37967@debbugs.gnu.org; Mon, 04 Nov 2019 16:24:08 -0500 Received: from sax.terramar.selidor.net (unknown [IPv6:2600:3c03:e001:114e:b029:6a28:83ac:1d43]) by lev.selidor.net (Postfix) with ESMTP id D4993C89C; Mon, 4 Nov 2019 21:24:07 +0000 (UTC) Received: by sax.terramar.selidor.net (Postfix, from userid 1000) id 013A99A6F80; Mon, 4 Nov 2019 16:23:12 -0500 (EST) Date: Mon, 4 Nov 2019 16:23:12 -0500 From: Ivan Vilata i Balaguer To: Ludovic =?iso-8859-1?Q?Court=E8s?= Subject: Re: bug#37967: guix environment -CN: Operation not permitted mounting host's /var/run/nscd Message-ID: <20191104212312.GK17621@sax.terramar.selidor.net> References: <20191028172741.GJ17570@sax.terramar.selidor.net> <87v9s7dwoe.fsf@gnu.org> <20191029224714.GA17621@sax.terramar.selidor.net> <87v9s3brl8.fsf@gnu.org> <20191101151002.GE17621@sax.terramar.selidor.net> <20191104032324.GG17621@sax.terramar.selidor.net> <87y2wv8tae.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87y2wv8tae.fsf@gnu.org> User-Agent: Mutt/1.12.2 (2019-09-21) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37967 Cc: 37967@debbugs.gnu.org, Ivan Vilata i Balaguer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ludovic Courtès (2019-11-04 18:07:05 +0100) wrote: > Ivan Vilata i Balaguer skribis: > > > BTW, I ran that under strace and it looks like the read-only remount fails > > after mounting `/var/run/nscd` in the new namespace has succeeded: > > > > $ strace -f unshare -mUr mount --bind -o ro /var/run/nscd /tmp/tt > > […] > > access("/run/mount", R_OK|W_OK) = -1 EACCES (Permission denied) > > mount("/run/nscd", "/tmp/tt", 0x14c25b0, MS_RDONLY|MS_BIND, NULL) = 0 > > mount("none", "/tmp/tt", NULL, MS_RDONLY|MS_REMOUNT|MS_BIND, NULL) = -1 EPERM (Operation not permitted) > > write(2, "mount: ", 7mount: ) = 7 > > write(2, "/tmp/tt: filesystem was mounted,"..., 89/tmp/tt: filesystem was mounted, but any subsequent operation failed: Unknown error 5005.) = 89 > > write(2, "\n", 1 > > […] > > Weird, why does it remount it? > > What does: > > mount | grep /run $ mount | grep /run tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1641444k,mode=755) […] > returns? I just tried on a Debian 10 image with Linux 4.19.0 and /run > is a tmpfs, which may be the reason why read-only bind-mounts fail (or > at least there’s a bug in that area.) > > Anyway, below is a patch for you to test. Let me know how it goes. :-) > > Thanks, > Ludo’. I applied your patch on top of bf7b08c4, pulled Guix and did successfully start `guix environment -CN`, with network support and all. Cool! `:)` > diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm > index 6cf6ccc53e..6cdb2b749d 100644 > --- a/gnu/system/file-systems.scm > +++ b/gnu/system/file-systems.scm > @@ -507,7 +507,8 @@ a bind mount." > ;; XXX: On some GNU/Linux systems, /etc/resolv.conf is a > ;; symlink to a file in a tmpfs which, for an unknown reason, > ;; cannot be bind mounted read-only within the container. > - (writable? (string=? file "/etc/resolv.conf")))) > + (writable? (or (string=? file "/etc/resolv.conf") > + (string=? file "/var/run/nscd"))))) > (cons "/var/run/nscd" %network-configuration-files))) > > (define (file-system-type-predicate type) -- Ivan Vilata i Balaguer -- https://elvil.net/ From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 04 17:37:20 2019 Received: (at 37967-done) by debbugs.gnu.org; 4 Nov 2019 22:37:20 +0000 Received: from localhost ([127.0.0.1]:37695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRkyN-0000wF-DF for submit@debbugs.gnu.org; Mon, 04 Nov 2019 17:37:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57563) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRkyL-0000w1-Lo for 37967-done@debbugs.gnu.org; Mon, 04 Nov 2019 17:37:18 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iRkyD-00006z-LW; Mon, 04 Nov 2019 17:37:10 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36260 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iRkyD-0002SN-4T; Mon, 04 Nov 2019 17:37:09 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ivan Vilata i Balaguer Subject: Re: bug#37967: guix environment -CN: Operation not permitted mounting host's /var/run/nscd References: <20191028172741.GJ17570@sax.terramar.selidor.net> <87v9s7dwoe.fsf@gnu.org> <20191029224714.GA17621@sax.terramar.selidor.net> <87v9s3brl8.fsf@gnu.org> <20191101151002.GE17621@sax.terramar.selidor.net> <20191104032324.GG17621@sax.terramar.selidor.net> <87y2wv8tae.fsf@gnu.org> <20191104212312.GK17621@sax.terramar.selidor.net> Date: Mon, 04 Nov 2019 23:37:07 +0100 In-Reply-To: <20191104212312.GK17621@sax.terramar.selidor.net> (Ivan Vilata i. Balaguer's message of "Mon, 4 Nov 2019 16:23:12 -0500") Message-ID: <87d0e746b0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37967-done Cc: 37967-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Ivan Vilata i Balaguer skribis: > I applied your patch on top of bf7b08c4, pulled Guix and did successfully > start `guix environment -CN`, with network support and all. Awesome, pushed as 625bdf09d344302ec2d5da7f35fe35ca1d128a93. Gr=C3=A0cies! :-) Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 08 14:07:30 2019 Received: (at 37967-done) by debbugs.gnu.org; 8 Nov 2019 19:07:30 +0000 Received: from localhost ([127.0.0.1]:47604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iT9bV-0006FN-OC for submit@debbugs.gnu.org; Fri, 08 Nov 2019 14:07:29 -0500 Received: from m4s11.vlinux.de ([83.151.27.109]:46602 helo=bjoernhoefling.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iT9bT-0006FD-Vp for 37967-done@debbugs.gnu.org; Fri, 08 Nov 2019 14:07:28 -0500 Received: from alma-ubu (pD951FEB5.dip0.t-ipconnect.de [217.81.254.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bjoernhoefling.de (Postfix) with ESMTPSA id 7E5E03FC4F; Fri, 8 Nov 2019 20:07:26 +0100 (CET) Date: Fri, 8 Nov 2019 20:07:23 +0100 From: =?UTF-8?B?QmrDtnJuIEjDtmZsaW5n?= To: Ludovic =?UTF-8?B?Q291cnTDqHM=?= Subject: Re: bug#37967: guix environment -CN: Operation not permitted mounting host's /var/run/nscd Message-ID: <20191108200723.055ce078@alma-ubu> In-Reply-To: <87d0e746b0.fsf@gnu.org> References: <20191028172741.GJ17570@sax.terramar.selidor.net> <87v9s7dwoe.fsf@gnu.org> <20191029224714.GA17621@sax.terramar.selidor.net> <87v9s3brl8.fsf@gnu.org> <20191101151002.GE17621@sax.terramar.selidor.net> <20191104032324.GG17621@sax.terramar.selidor.net> <87y2wv8tae.fsf@gnu.org> <20191104212312.GK17621@sax.terramar.selidor.net> <87d0e746b0.fsf@gnu.org> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/oSVDjuJaLOQcZ6n1LhBZcFo"; protocol="application/pgp-signature" X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 37967-done Cc: 37967-done@debbugs.gnu.org, Ivan Vilata i Balaguer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Sig_/oSVDjuJaLOQcZ6n1LhBZcFo Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, 04 Nov 2019 23:37:07 +0100 Ludovic Court=C3=A8s wrote: > Hi, >=20 > Ivan Vilata i Balaguer skribis: >=20 > > I applied your patch on top of bf7b08c4, pulled Guix and did > > successfully start `guix environment -CN`, with network support and > > all. =20 >=20 > Awesome, pushed as 625bdf09d344302ec2d5da7f35fe35ca1d128a93. Hi, I had the same issue and was too lazy to report. I can confirm that the commit fixed it. Thanks for reporting and fixing. Bj=C3=B6rn --Sig_/oSVDjuJaLOQcZ6n1LhBZcFo Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQQiGUP0np8nb5SZM4K/KGy2WT5f/QUCXcW86wAKCRC/KGy2WT5f /WXRAJ0VZPZmerd/IK/FKHiaJ1E/WQvaogCbBniqvf0n0QYz5vwGszsePrQvxco= =qQ0f -----END PGP SIGNATURE----- --Sig_/oSVDjuJaLOQcZ6n1LhBZcFo-- From unknown Sat Sep 13 17:05:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 07 Dec 2019 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator