From: Paul Furness Subject: Non-root mount of a FS? Date: 28 Oct 2002 13:47:51 +0000 Sender: linux-admin-owner@vger.kernel.org Message-ID: <1035812871.2016.14.camel@zebra.vil.ite.mee.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: List-Id: Content-Type: text/plain; charset="us-ascii" To: linux-admin@vger.kernel.org Good afternoon. Can anyone help me out with something that's been annoying me for at least a year? I'm currently using RH 7.3 and Gnome, with Ximian on top, but I think that is probably not all that relevant to this: If I log in as me (not root) and I put a CD in, I can mount it by device like this: mount /dev/cdrom or by mount point like this: mount /mnt/cdrom This all works fine because I have this in my /etc/fstab: /dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0 So far, so good. I can also do this with a floppy (mount /dev/fd0 or mount /mnt/floppy) because I also have this in /etc/fstab: /dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0 So I want to do this with another device (in this case a USB Flash HD which appears as sda1) so I do this: /dev/sda1 /mnt/ezdrive vfat noauto,owner,kudzu 0 0 The problem is that, as root, can do what I want (mount /dev/sda1) and it works just fine. But if I try this as the user, I get this: mount: only root can mount /dev/sda1 on /mnt/ezdrive So it's a permission thing, right? This is where I get lost. "ls -l /dev/cdrom" shows that it's a pointer to /dev/scd0. "ls -l /dev/scd0 shows that the file is owned by me. If I log into the machine as someone else, the file is owned by them. However, /dev/sda1 is persistently owned by root. So something is changing the ownership of the device files to enable the user to mount those devices? What? How can I set it up to do this for other devices (or even NFS mounts but not using AMD)? I'm having a real hard time finding any documentation for this. Oh, and I _don't_ have autofs running. Somebody must know what's going on... Thanks Paul. -- Paul Furness Systems Manager Steepness is an illusion caused by flat things leaning over.