Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 26 Feb 2003 08:29:53 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 26 Feb 2003 08:29:53 -0500 Received: from mailout09.sul.t-online.com ([194.25.134.84]:65254 "EHLO mailout09.sul.t-online.com") by vger.kernel.org with ESMTP id convert rfc822-to-8bit; Wed, 26 Feb 2003 08:29:52 -0500 Cc: miquels@cistron-office.nl (Miquel van Smoorenburg), linux-kernel@vger.kernel.org References: <20030219112111.GD130@DervishD> <3E5C8682.F5929A04@daimi.au.dk> <87u1er71d0.fsf@goat.bogus.local> <87el5v6xvj.fsf@goat.bogus.local> From: Olaf Dietsche To: mru@users.sourceforge.net (=?iso-8859-1?q?M=E5ns_Rullg=E5rd?=) Subject: Re: About /etc/mtab and /proc/mounts Date: Wed, 26 Feb 2003 14:39:31 +0100 In-Reply-To: (mru@users.sourceforge.net's message of "26 Feb 2003 13:34:23 +0100") Message-ID: <8765r76u0c.fsf@goat.bogus.local> User-Agent: Gnus/5.090005 (Oort Gnus v0.05) XEmacs/21.4 (Military Intelligence, i386-debian-linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1332 Lines: 30 mru@users.sourceforge.net (M?ns Rullg?rd) writes: > Olaf Dietsche writes: > >> 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. I just verified it. I and anybody else can mount and umount /cdrom. If I mounted /cdrom, someone else can umount it. $ mount -V mount: mount-2.11n $ grep user /etc/fstab /dev/hdb/0 /cdrom iso9660 defaults,ro,unhide,user,noauto,noexec,nosuid 0 2 $ ls -l /etc/mtab lrwxrwxrwx 1 root root 12 2002-09-22 02:58 /etc/mtab -> /proc/mounts When /etc/mtab is a regular file, it works as you described. Regards, Olaf. - 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/