From mboxrd@z Thu Jan 1 00:00:00 1970 From: Diego Nicola Barbato Subject: bug#37569: Mount does not honor 'user' option. Date: Tue, 01 Oct 2019 15:41:59 +0200 Message-ID: <87lfu4wpjs.fsf@GlaDOS.home> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:59361) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFIQh-0005Ad-Ek for bug-guix@gnu.org; Tue, 01 Oct 2019 09:43:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFIQg-0006xz-Bh for bug-guix@gnu.org; Tue, 01 Oct 2019 09:43:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52316) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iFIQg-0006xl-8a for bug-guix@gnu.org; Tue, 01 Oct 2019 09:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iFIQg-0001OB-5i for bug-guix@gnu.org; Tue, 01 Oct 2019 09:43:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: 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 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) 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) List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 37569@debbugs.gnu.org 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