All of lore.kernel.org
 help / color / mirror / Atom feed
From: "U.Mutlu" <for-gmane@mutluit.com>
To: util-linux@vger.kernel.org
Subject: Re: RFC: usermount - a secure mount for unpriviledged users
Date: Thu, 19 Nov 2015 19:18:33 +0100	[thread overview]
Message-ID: <n2l3pq$g40$1@ger.gmane.org> (raw)
In-Reply-To: <n2l35p$5hm$1@ger.gmane.org>

U.Mutlu wrote on 11/19/2015 07:07 PM:
> Karel Zak wrote on 11/19/2015 12:05 PM:
>> On Wed, Nov 18, 2015 at 06:17:12PM +0100, U.Mutlu wrote:
>>> Currently no responsible admin can grant permission to the mount pgm
>>> to his users, because of the dangers inherent with bind-mounting etc.
>>
>> man mount, "The non-superuser mounts." section.
>>
>>      Karel
>
> The man page says:
>   The non-superuser mounts.
>   Normally, only the superuser can mount filesystems. However, when fstab
>   contains the user option on a line, anybody can mount the corresponding
> filesystem.
>
> Ok, let's try this out:
>
> /etc/fstab:
> ...
> /home/userx/tmp/myfs1.img /home/userx/tmp/mymnt1 auto user,noauto 0 0
> /home/userx/tmp/myfs2.img /home/userx/tmp/mymnt2 auto user,noauto 0 0
>
> userx@mach:~/tmp$ ls -l
> -rw-r--r-- 1 userx userx 10485760 Nov 19 02:11 myfs1.img
> -rw-r--r-- 1 userx userx 10485760 Nov 17 07:20 myfs2.img
> drwxr-xr-x 2 userx userx     4096 Nov 19 18:38 mymnt1
> drwxr-xr-x 2 userx userx     4096 Nov 19 18:38 mymnt2
>
> userx@mach:~/tmp$ mount /home/userx/tmp/myfs1.img /home/userx/tmp/mymnt1
> mount: only root can do that
>
> So, then why is this not working?

Ok, it now works when doing so:
$ userx@mach:~/tmp$ mount ./mymnt1

and unmounting
$ userx@mach:~/tmp$ umount ./mymnt1




      reply	other threads:[~2015-11-19 18:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-18 17:17 RFC: usermount - a secure mount for unpriviledged users U.Mutlu
2015-11-18 18:24 ` Mantas Mikulėnas
2015-11-19  0:53   ` mount-user.c U.Mutlu
2015-12-03 20:06     ` mount-user.c Michael Conrad
2015-12-04  7:32       ` mount-user.c U.Mutlu
2015-11-19  1:08   ` RFC: usermount - a secure mount for unpriviledged users Casper Ti. Vector
2015-11-19  1:53     ` udevil - mount tool U.Mutlu
2015-11-19  2:21       ` Casper Ti. Vector
2015-11-19 11:05 ` RFC: usermount - a secure mount for unpriviledged users Karel Zak
2015-11-19 18:07   ` U.Mutlu
2015-11-19 18:18     ` U.Mutlu [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='n2l3pq$g40$1@ger.gmane.org' \
    --to=for-gmane@mutluit.com \
    --cc=util-linux@vger.kernel.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.