[oclug] Re: *Why* aren't users generally able to umount?
linuxdoctor at yahoo.com
Fri Feb 9 12:37:40 EST 2001
I haven't been following this mount/umount thread, but it seems to me
that you've got into a bit of a bind here.
Generally, when mounting and umounting when not root, you must let
the system decide where to mount and umount. So a sequence such as
'mount /dev/xxx /some_dir_I_can_write_to' will work as long as the
fstab entry for that device has the 'user' option turned on. However,
unless that directory is also included in the fstab entry for that
device, only root can umount it.
Now, a 'mount /dev/xxx' will work and will mount the device on
wherever fstab tells it to. So, to umount it just 'umount /dev/xxx'
and this should work.
The general rule is that you can always mount a device onto some
inode you have access to, but you can only umount it if both the
device AND the directory it's mounted on is included in the fstab.
Otherwise, if some local user on your computer mounts (say) a floppy
on his local directory and you want to mount your floppy instead,
there is nothing that prevents you from unmounting his local copy.
It's not very elegant I know.
--- Michael Anderson -- Fibics Incorporated <manderson at fibics.com>
> Long message follows below.
> Thanks to all.
> Cheers, Michael A.
> Vic Gedris wrote:
> > How were you able to mount it if you cannot unmount it? Wouldn't
> > have to be in /etc/fstab in the first place to mount as a regular
> No, it wouldn't. This is pretty much the same problem that we saw
> with setting up
> the Corel Linux lab last August: getting things mounted seemed
> easy; unmounting was a problem.
> ie. Vic wrote about the dreaded "... and you are not root"
> On 29/aug/00 Vic Gedris wrote to
> > If anyone can help me with this, please reply directly by email
> or post
> > back to this newsgroup...
> > I have successfully mounted a Windows shared folder into Corel
> Linux 1.2
> > using the File manager. Works great. However.....even though I
> > the "Disconnect at logout and reconnect at logon" box it does NOT
> > unmount the drive when the user logs out.
> > Unmounting via the command line also fails:
> > umount: /foor/bar is not in the fstab (and you are not root)
> > This is not a big deal if I were the only user here, but this is
> in a
> > college lab where the number of mounted directories will escalate
> > time someone logs in.
> > Is this a bug, or just a feature that requires a workaround?
> Also, David Skoll wrote:
> > Most likely, some process has a file open on the file system.
> You cannot
> > unmount a file system while a process is using it. (The error
> > you're getting sounds misleading.)
> Yes, that is often the case. But I think I'm focussing on
> something different. Below is a transcript of a mount+umount
> attempt. Nothing else was going on in the system (as shown by the
> fuser command), so I'm guessing that there is some philosophical
> reason why unmounting is not considered appropriate for users.
> [michaela at localhost ~]$ ls -ld tmpmnt
> drwxrwxrwx 2 michaela michaela 4096 Jan 24 15:08 tmpmnt
> [michaela at localhost ~]$ ls -l /bin/*mount
> -rwsr-xr-x 1 root root 62268 Oct 3 01:39 /bin/mount
> -rwsr-xr-x 1 root root 28380 Oct 3 01:39 /bin/umount
> [michaela at localhost ~]$ smbmount //foobar/downloads tmpmnt
> [michaela at localhost ~]$ umount tmpmnt
> umount: /home/michaela/tmpmnt is not in the fstab (and you are not
> [michaela at localhost ~]$ /sbin/fuser tmpmnt
> [michaela at localhost
> oclug mailing list
> oclug at lists.oclug.on.ca
"However dazzling and dauting (the technologist's) display
of worldly wisdom, their true inspiration lies elsewhere,
in an enduring, otherworldly quest for transcendence and
salvation" - David F. Noble, "The Religion of Technology"
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
More information about the OCLUG