unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Diego Nicola Barbato <dnbarbato@posteo.de>
To: 37569@debbugs.gnu.org
Subject: bug#37569: Mount does not honor 'user' option.
Date: Tue, 01 Oct 2019 15:41:59 +0200	[thread overview]
Message-ID: <87lfu4wpjs.fsf@GlaDOS.home> (raw)

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 <name> with something
more appropriate:

  LABEL=foofs /home/<name>/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/<name>/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

             reply	other threads:[~2019-10-01 13:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-01 13:41 Diego Nicola Barbato [this message]
2019-10-01 19:27 ` bug#37569: Mount does not honor 'user' option Danny Milosavljevic
2019-10-01 21:43   ` Diego Nicola Barbato
2019-10-04  6:59     ` Diego Nicola Barbato
2019-10-06 12:46       ` Ludovic Courtès

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=87lfu4wpjs.fsf@GlaDOS.home \
    --to=dnbarbato@posteo.de \
    --cc=37569@debbugs.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).