> De : Philip Guenther <guent...@gmail.com>

> Objet : Re: Mounting a
partition, cdrom, usb as a user
> 
> On Sat, Jun 16, 2012 at 11:43 AM,
Christiano F. Haesbaert
> <haesba...@openbsd.org> wrote:
>>  On Sat, Jun 16,
2012 at 01:48:17PM +0200, Antoine Jacoutot wrote:
>>>  On Sat, Jun 16, 2012 at
12:39:36PM +0100, Mik J wrote:
> ...
>>>  > However, I'm unable to
>>>  >
mount the partition if the owner of /mnt/extpart is root although 
> that
mount point is rwx by the group operator and myuser belongs to that 
> group.
>>>  > # ls -l
>>>  > /mnt
>>>  > drwxrwxr-x   2 root  operator  512 May  7
22:38 extpart
>>>  >
>>>  > I assume that
>>>  > kern.usermount allows a
partition to be mounted only if the mount 
> point is
>>>  > owned by a user
and the group owner is not considered.
>>>  > I have search for a
>>>  >
variable kern.groupmount but there is not such thing.
>>>  >
>>>  > So my
question is:
>>>  > Is it possible to allow a group to mount partitions (or
usb keys, 
> cdrom) ?
>>> 
>>>  Man mount(8).
>>>  "  Only the superuser may
>>>  mount file systems unless kern.usermount is nonzero (see sysctl(8)), 
>
the
>>>  special device is readable and writeable by the user attempting the
>>>  mount, and the mount point node is owned by the user attempting the
>>>
mount."
>> 
>>  Any special reason why not respecting groups ?
>>  This feels
like a strange behaviour.
> 
> It's not obvious to me that it's safe.  For
example, you would also
> need a !(mode & S_ISTXT) test.  Should sys_unmount
let other users in
> the group unmount it?  Stacking of mounts by different
users in the
> same group?
> 
> Lacking any info about what problem this is
supposed to be a solution
> to, my response to the original question is
>
"Have each user mount somewhere they own and use a symlink"
> 
> 
> Philip
Guenther

Thank you all for your answers.
Of
 course Antoine, I checked the
man before asking the question. But the 
man is clear about mount about
mounting a device as a user and not 
saying anything about groups.
Philip,
regarding the stacking of mounts I have tried to mount as root the same
partition twice, on /mnt/mount1 and /mnt/mount2. The system told me
"mount_ffs: /dev/wd0a on /mnt/mount2: Device busy". I would expect the 
same
behavior if two users are trying to mount the same device.
I use sudo for
other things but it didn't come to my mind.

Reply via email to