lkml.org 
[lkml]   [2003]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: About /etc/mtab and /proc/mounts
From
Date
Olaf Dietsche <olaf.dietsche@t-online.de> writes:

> >> I thought, this is what /var is for. So, /var/run, /var/lib/misc or
> >> /var/etc might be more appropriate?
> >
> > What if /var is mounted separately?
>
> I didn't think of this, even though I have it separately on my
> machine.
>
> >> OTOH, "ln -s /proc/mounts /etc/mtab" works just fine here.
> >
> > The only problem I have with that is that option 'user' is lost. This
> > means that any user can mount /cdrom, but only root can unmount it.
>
> The 'user' option is in /etc/fstab, so this is not a problem. I can
> mount _and_ umount /cdrom as a simple user.

It's strange if you can. My mount (fairly recent) looks in fstab to
determine whether a user should be allowed to mount a device.
However, when unmounting it checks /etc/mtab to make sure it was you
who mounted it in the first place, making it impossible to unmount
someone else's cdrom. If you use the 'users' (note the 's') option
instead any user can mount or unmount the device at any time, mtab
being ignored.

--
Måns Rullgård
mru@users.sf.net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.268 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site