From unknown Sat Jun 21 12:18:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37569: Mount does not honor 'user' option. Resent-From: Diego Nicola Barbato Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 01 Oct 2019 13:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37569 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 37569@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15699373295251 (code B ref -1); Tue, 01 Oct 2019 13:43:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 Oct 2019 13:42:09 +0000 Received: from localhost ([127.0.0.1]:32901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFIPo-0001Md-Oz for submit@debbugs.gnu.org; Tue, 01 Oct 2019 09:42:09 -0400 Received: from lists.gnu.org ([209.51.188.17]:36213) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFIPn-0001MV-6w for submit@debbugs.gnu.org; Tue, 01 Oct 2019 09:42:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59250) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFIPl-0003u7-5J for bug-guix@gnu.org; Tue, 01 Oct 2019 09:42:06 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFIPk-0006DY-3j for bug-guix@gnu.org; Tue, 01 Oct 2019 09:42:04 -0400 Received: from mout02.posteo.de ([185.67.36.66]:58099) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFIPj-0006BH-Kr for bug-guix@gnu.org; Tue, 01 Oct 2019 09:42:04 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id CC81B2400FB for ; Tue, 1 Oct 2019 15:42:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1569937320; bh=ZDjmqhOmmOKOWsiOy9Pw26J8SyOYGC/gDBin6qxQrmU=; h=From:To:Subject:Date:From; b=oT/r30n0hqbAsn9aatV7vitro8KwKC/JS2kqZQvSXk3T8bulkTuxrjXcRv0dq9uav 8hOGykgLE2n6pV+lv0XL9dpOQg7esaYk14yep1Cwd2mg81LPIYFipP1z42nI41r3ug z2PL4d0smxyJO3fPFZa3qHVzSSCpfQDsHZPmpcExcgMU3JcV2dY4yz/h+lzhSQzoBQ GlUJuozwZjVrJBMwLRPWTgU7GJYnBtzO7Jqo9ip9lwhTBkUMr1eTd972LvD1Py+l/f HyA1jIPcIC8iP7POyYQlDC4YosD7wBnqB7ILsQMk8l77xjwEm2ICx9hPmFyWTwtzkb /4xUzDOm4x4kw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 46jL6H3vwpz9rxM for ; Tue, 1 Oct 2019 15:41:59 +0200 (CEST) From: Diego Nicola Barbato User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Date: Tue, 01 Oct 2019 15:41:59 +0200 Message-ID: <87lfu4wpjs.fsf@GlaDOS.home> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.67.36.66 X-Spam-Score: -1.3 (-) 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.3 (--) Hey Guix, I have added the following to `file-systems' in my operating-system config: --8<---------------cut here---------------start------------->8--- (file-system (device "127.0.0.1") (mount-point "/home/diego/inf") (type "9p") (options "noextend,trans=tcp,dfltuid=1000,dfltgid=998,port=9001,user,nofail") (mount? #f)) --8<---------------cut here---------------end--------------->8--- It works almost as expected except that when I try to mount the file system as a regular user (which is what the option 'user' is supposed to allow) I get: $ LC_ALL=C mount inf mount: /home/diego/inf: must be superuser to use mount. The command succeeds if I run it as root. The following steps reproduce the issue without using a 9p file system: 1. Prepare a file system on a loopback device: $ dd if=/dev/zero of=foo.img bs=1024 count=524288 $ udisksctl loop-setup --file foo.img Mapped file foo.img as /dev/loop0. $ sudo mkfs.ext4 -L foofs /dev/loop0 2. Add the following line to /etc/fstab replacing with something more appropriate: LABEL=foofs /home//foofs ext4 defaults,user 3. Try to mount the filesystem as an unprivileged user (This should work and does work on e.g. Debian 10): $ mkdir foofs $ LC_ALL=C mount foofs mount: /home//foofs: must be superuser to use mount. 4. Try it with sudo to confirm that everything else works as expected: $ sudo mount foofs $ ls foofs lost+found/ Regards, Diego From unknown Sat Jun 21 12:18:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37569: Mount does not honor 'user' option. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 01 Oct 2019 19:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37569 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Diego Nicola Barbato Cc: 37569@debbugs.gnu.org Received: via spool by 37569-submit@debbugs.gnu.org id=B37569.156995805922522 (code B ref 37569); Tue, 01 Oct 2019 19:28:01 +0000 Received: (at 37569) by debbugs.gnu.org; 1 Oct 2019 19:27:39 +0000 Received: from localhost ([127.0.0.1]:34827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFNoB-0005rB-GQ for submit@debbugs.gnu.org; Tue, 01 Oct 2019 15:27:39 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:39204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFNo9-0005r0-4f for 37569@debbugs.gnu.org; Tue, 01 Oct 2019 15:27:37 -0400 Received: from localhost (77.116.238.250.wireless.dyn.drei.com [77.116.238.250]) by dd26836.kasserver.com (Postfix) with ESMTPSA id E3AB13362059; Tue, 1 Oct 2019 21:27:33 +0200 (CEST) Date: Tue, 1 Oct 2019 21:27:26 +0200 From: Danny Milosavljevic Message-ID: <20191001212726.62b763e1@scratchpost.org> In-Reply-To: <87lfu4wpjs.fsf@GlaDOS.home> References: <87lfu4wpjs.fsf@GlaDOS.home> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/ILxt5Phc8JFcjgipfDtwAtV"; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) 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.7 (-) --Sig_/ILxt5Phc8JFcjgipfDtwAtV Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hmm, how is that solved with other distributions? Is "mount" suid root the= re? --Sig_/ILxt5Phc8JFcjgipfDtwAtV Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl2TqJ4ACgkQ5xo1VCww uqWhAwgApFre3wTRY1kifh/aVYEcRBj9j03b887lJzs+GPaR9af8bNbvDafXqeN2 kJ8wa7eU6kLa4CpCQrppcXLMNH5sMmR56Ny7Cjh2IUkmUMaRFOvKNg6vA4QFllH5 wXnwFNVHusYtXjOh0lLVTSMdDNDhBi3mMYzmpUhO5MmDC+AGQ0AhidsA1fjTDKXJ JWTaU5Kyikzk1z+ehR5p0HSEBxog4AuQiPPSWplAg1DaxHA3nRmS3bRpV9lOQNmm RrBdf1J35FxrQpADsaf9yDFRxbkrANjojbwjXZb8DK9AS90Ps3+xqZY0Q59VirTV 45CaOo7Ev5AM/k+j1XqTRcB4DrxLWQ== =JWIX -----END PGP SIGNATURE----- --Sig_/ILxt5Phc8JFcjgipfDtwAtV-- From unknown Sat Jun 21 12:18:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37569: Mount does not honor 'user' option. Resent-From: Diego Nicola Barbato Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 01 Oct 2019 21:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37569 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Danny Milosavljevic Cc: 37569@debbugs.gnu.org Received: via spool by 37569-submit@debbugs.gnu.org id=B37569.156996620628561 (code B ref 37569); Tue, 01 Oct 2019 21:44:01 +0000 Received: (at 37569) by debbugs.gnu.org; 1 Oct 2019 21:43:26 +0000 Received: from localhost ([127.0.0.1]:35122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFPvZ-0007Qb-OJ for submit@debbugs.gnu.org; Tue, 01 Oct 2019 17:43:26 -0400 Received: from mout02.posteo.de ([185.67.36.66]:45253) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFPvX-0007QJ-5W for 37569@debbugs.gnu.org; Tue, 01 Oct 2019 17:43:24 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id A81CA2400E6 for <37569@debbugs.gnu.org>; Tue, 1 Oct 2019 23:43:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1569966196; bh=s6sRe6EMamahY7JuqbEaf7Wdn+DbaxuZcgV39lMrmkE=; h=From:To:Cc:Subject:Date:From; b=ntZZbCcVCkQyBt6lUxMgNdRLnEEWci9jS47ntqx7fpZxxqFiWwQhl5Ad/qm/5EpEf Foo0mNjeHem+di9oypAFb/VuHbwxxp6abjqlzFjb3RwHrU7mtdL4Bl8/F9tY4qzYFj pl2+dB+wz609Ngu4sUTWrQWQ9Yi9MSC5eZfcvXs5qbCxMfkNB88cn8AK1xsz9Pi7+X gQAGwbkej75BNxqfn3hQJHbEEPKyTZD/GTor6IlhAEwa/BWUJwIZC0MFFD/iVOPSc4 9hlxIEIPwL+tYKqsBrPHqaK+AvnFSyRKI1IpunyJ455U/L1GC71ShI8WPH4O0p0BGy gmRspdSsfQiSA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 46jXnb1XYnz9rxL; Tue, 1 Oct 2019 23:43:14 +0200 (CEST) From: Diego Nicola Barbato References: <87lfu4wpjs.fsf@GlaDOS.home> <20191001212726.62b763e1@scratchpost.org> Date: Tue, 01 Oct 2019 23:43:14 +0200 In-Reply-To: <20191001212726.62b763e1@scratchpost.org> (Danny Milosavljevic's message of "Tue, 1 Oct 2019 21:27:26 +0200") Message-ID: <87h84sw39p.fsf@GlaDOS.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Hello Danny, Danny Milosavljevic writes: > Hmm, how is that solved with other distributions? Is "mount" suid root there? Indeed, in Debian both mount and umount are suid root: $ stat -c "%a %U:%G %n" /bin/*mount 4755 root:root /bin/fusermount 4755 root:root /bin/mount 4755 root:root /bin/umount Thanks, Diego From unknown Sat Jun 21 12:18:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37569: Mount does not honor 'user' option. Resent-From: Diego Nicola Barbato Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 04 Oct 2019 07:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37569 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Danny Milosavljevic Cc: 37569@debbugs.gnu.org Received: via spool by 37569-submit@debbugs.gnu.org id=B37569.15701723733485 (code B ref 37569); Fri, 04 Oct 2019 07:00:02 +0000 Received: (at 37569) by debbugs.gnu.org; 4 Oct 2019 06:59:33 +0000 Received: from localhost ([127.0.0.1]:41614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iGHYr-0000u9-2W for submit@debbugs.gnu.org; Fri, 04 Oct 2019 02:59:33 -0400 Received: from mout02.posteo.de ([185.67.36.66]:53123) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iGHYp-0000tv-FB for 37569@debbugs.gnu.org; Fri, 04 Oct 2019 02:59:32 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id C97492400E6 for <37569@debbugs.gnu.org>; Fri, 4 Oct 2019 08:59:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1570172364; bh=acZDplpSWPJHMefHPopMo9LjrUxn2CXEuwWDmvauhec=; h=From:To:Cc:Subject:Date:From; b=foSSHA3+yySBnbX92v4JyhO+6MBe2MKaX6PBvVPS/IT8PrI5zQgKJXrBAHxSV5ZGt dshjgVTx6a4A54Bz1yrCRsKLsh77ZkMUnAiU+DE3PJptMFaW9H7cFGuHQWpLXHoYSA 4O/oN2nU5atqTDO3T9b/ryhOLCEGWcCfqflR9sjxPJiY9pPeTKtjydP48VDIulgEgM DGBTQwd2AbJDsxG+6CTsmparII6kCOYG8Wb3JCxiJrp2vna+nQgoo+hr9OvOLo/9cv 0oqgKG4YxRTFLdJUt6qFNdzAbZrzGn1K4e9gnQgf57nRCQkLEf+vCOP2iglS3TKozg tNRgNFFtsgjFg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 46l12M2tK6z9rxQ; Fri, 4 Oct 2019 08:59:23 +0200 (CEST) From: Diego Nicola Barbato In-Reply-To: <87h84sw39p.fsf@GlaDOS.home> (Diego Nicola Barbato's message of "Tue, 01 Oct 2019 23:43:14 +0200") References: <87lfu4wpjs.fsf@GlaDOS.home> <20191001212726.62b763e1@scratchpost.org> <87h84sw39p.fsf@GlaDOS.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Date: Fri, 04 Oct 2019 08:59:22 +0200 Message-ID: <87k19lt2r9.fsf@GlaDOS.home> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Diego Nicola Barbato writes: > Hello Danny, > > Danny Milosavljevic writes: > >> Hmm, how is that solved with other distributions? Is "mount" suid root there? > > Indeed, in Debian both mount and umount are suid root: > > $ stat -c "%a %U:%G %n" /bin/*mount > 4755 root:root /bin/fusermount > 4755 root:root /bin/mount > 4755 root:root /bin/umount I've tried adding "mount" and "umount" to `setuid-programs' in my operating-system config: --8<---------------cut here---------------start------------->8--- (setuid-programs (cons* #~(string-append #$util-linux "/bin/mount") #~(string-append #$util-linux "/bin/umount") %setuid-programs)) --8<---------------cut here---------------end--------------->8--- Mounting as an unprivileged user now works as expected (even the fancy 9p stuff). Is there any rationale for not adding "mount" and "umount" to `%setuid-programs' by default? Thanks, Diego From unknown Sat Jun 21 12:18:24 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Diego Nicola Barbato Subject: bug#37569: closed (Re: bug#37569: Mount does not honor 'user' option.) Message-ID: References: <87a7aedotm.fsf@gnu.org> <87lfu4wpjs.fsf@GlaDOS.home> X-Gnu-PR-Message: they-closed 37569 X-Gnu-PR-Package: guix Reply-To: 37569@debbugs.gnu.org Date: Sun, 06 Oct 2019 12:47:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1570366022-17220-1" This is a multi-part message in MIME format... ------------=_1570366022-17220-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #37569: Mount does not honor 'user' option. which was filed against the guix package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 37569@debbugs.gnu.org. --=20 37569: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D37569 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1570366022-17220-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 37569-done) by debbugs.gnu.org; 6 Oct 2019 12:46:22 +0000 Received: from localhost ([127.0.0.1]:45793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iH5vZ-0003wY-Un for submit@debbugs.gnu.org; Sun, 06 Oct 2019 08:46:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iH5vY-0003qL-Lb for 37569-done@debbugs.gnu.org; Sun, 06 Oct 2019 08:46:20 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iH5vT-0002OV-Au; Sun, 06 Oct 2019 08:46:15 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=40808 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iH5vS-00037f-M6; Sun, 06 Oct 2019 08:46:15 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Diego Nicola Barbato Subject: Re: bug#37569: Mount does not honor 'user' option. References: <87lfu4wpjs.fsf@GlaDOS.home> <20191001212726.62b763e1@scratchpost.org> <87h84sw39p.fsf@GlaDOS.home> <87k19lt2r9.fsf@GlaDOS.home> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 15 =?utf-8?Q?Vend=C3=A9miaire?= 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: Sun, 06 Oct 2019 14:46:13 +0200 In-Reply-To: <87k19lt2r9.fsf@GlaDOS.home> (Diego Nicola Barbato's message of "Fri, 04 Oct 2019 08:59:22 +0200") Message-ID: <87a7aedotm.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: 37569-done Cc: Danny Milosavljevic , 37569-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, Diego Nicola Barbato skribis: > I've tried adding "mount" and "umount" to `setuid-programs' in my > operating-system config: > > (setuid-programs (cons*=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 > #~(string-append #$util-linux "/bin/mount")=20 > #~(string-append #$util-linux "/bin/umount") > %setuid-programs)) > > Mounting as an unprivileged user now works as expected (even the fancy > 9p stuff). Cool! > Is there any rationale for not adding "mount" and "umount" to > `%setuid-programs' by default? No, especially since they perform the right checks and error out with =E2=80=9Conly root can do that=E2=80=9D when needed. I added them in commit 19944227528502e3619a6d1557bc735224f6fef6. Thanks! Ludo=E2=80=99. ------------=_1570366022-17220-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 1 Oct 2019 13:42:09 +0000 Received: from localhost ([127.0.0.1]:32901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFIPo-0001Md-Oz for submit@debbugs.gnu.org; Tue, 01 Oct 2019 09:42:09 -0400 Received: from lists.gnu.org ([209.51.188.17]:36213) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFIPn-0001MV-6w for submit@debbugs.gnu.org; Tue, 01 Oct 2019 09:42:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59250) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFIPl-0003u7-5J for bug-guix@gnu.org; Tue, 01 Oct 2019 09:42:06 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFIPk-0006DY-3j for bug-guix@gnu.org; Tue, 01 Oct 2019 09:42:04 -0400 Received: from mout02.posteo.de ([185.67.36.66]:58099) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFIPj-0006BH-Kr for bug-guix@gnu.org; Tue, 01 Oct 2019 09:42:04 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id CC81B2400FB for ; Tue, 1 Oct 2019 15:42:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1569937320; bh=ZDjmqhOmmOKOWsiOy9Pw26J8SyOYGC/gDBin6qxQrmU=; h=From:To:Subject:Date:From; b=oT/r30n0hqbAsn9aatV7vitro8KwKC/JS2kqZQvSXk3T8bulkTuxrjXcRv0dq9uav 8hOGykgLE2n6pV+lv0XL9dpOQg7esaYk14yep1Cwd2mg81LPIYFipP1z42nI41r3ug z2PL4d0smxyJO3fPFZa3qHVzSSCpfQDsHZPmpcExcgMU3JcV2dY4yz/h+lzhSQzoBQ GlUJuozwZjVrJBMwLRPWTgU7GJYnBtzO7Jqo9ip9lwhTBkUMr1eTd972LvD1Py+l/f HyA1jIPcIC8iP7POyYQlDC4YosD7wBnqB7ILsQMk8l77xjwEm2ICx9hPmFyWTwtzkb /4xUzDOm4x4kw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 46jL6H3vwpz9rxM for ; Tue, 1 Oct 2019 15:41:59 +0200 (CEST) From: Diego Nicola Barbato To: bug-guix@gnu.org Subject: Mount does not honor 'user' option. User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Date: Tue, 01 Oct 2019 15:41:59 +0200 Message-ID: <87lfu4wpjs.fsf@GlaDOS.home> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.67.36.66 X-Spam-Score: -1.3 (-) 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.3 (--) Hey Guix, I have added the following to `file-systems' in my operating-system config: --8<---------------cut here---------------start------------->8--- (file-system (device "127.0.0.1") (mount-point "/home/diego/inf") (type "9p") (options "noextend,trans=tcp,dfltuid=1000,dfltgid=998,port=9001,user,nofail") (mount? #f)) --8<---------------cut here---------------end--------------->8--- It works almost as expected except that when I try to mount the file system as a regular user (which is what the option 'user' is supposed to allow) I get: $ LC_ALL=C mount inf mount: /home/diego/inf: must be superuser to use mount. The command succeeds if I run it as root. The following steps reproduce the issue without using a 9p file system: 1. Prepare a file system on a loopback device: $ dd if=/dev/zero of=foo.img bs=1024 count=524288 $ udisksctl loop-setup --file foo.img Mapped file foo.img as /dev/loop0. $ sudo mkfs.ext4 -L foofs /dev/loop0 2. Add the following line to /etc/fstab replacing with something more appropriate: LABEL=foofs /home//foofs ext4 defaults,user 3. Try to mount the filesystem as an unprivileged user (This should work and does work on e.g. Debian 10): $ mkdir foofs $ LC_ALL=C mount foofs mount: /home//foofs: must be superuser to use mount. 4. Try it with sudo to confirm that everything else works as expected: $ sudo mount foofs $ ls foofs lost+found/ Regards, Diego ------------=_1570366022-17220-1--