Re: Umont ownership?
On Tue, 6 Apr 2010 10:23:16 -0400 (EDT), Camaleón wrote:
>
> Uh? So it works fine for root user...
>
> O.K., Let me check with my USB flash drive. After I plugg it:
>
> ***
> sm01@stt008:~$ mount | grep fat
> /dev/sdc1 on /media/disk type vfat (rw,nosuid,nodev,uhelper=hal,shortname=lower,uid=1000)
> ***
>
> I try to umount it:
>
> ***
> sm01@stt008:~$ umount /media/disk
> ***
>
> And now I verify it has been "really" umounted:
>
> ***
> sm01@stt008:~$ mount | grep fat
> ***
>
> Seems to be working here for my plain user.
I'll be the first to admit that I don't know much about this hotplug and
GUI stuff. The closest I come to a hotplug event is to load an audio
CD into my CD drive. I wait until the GNOME "Sound Juicer" application
auto-launches, wait for it to display the track titles, then I close the
window. I then type "cdplay" at a shell prompt to use the analog
play method. I never hot-plug a USB device, not because it's evil,
but because at this point I have no reason to do do. Maybe someday I'll
hot-plug a USB device, just to see how it feels! ;-)
But here's what I *do* know. The root user can issue mount or umount
commands for any file system or mount point. A non-root user *may* be able
to mount *some* file systems and *some* mount points depending on what is
specified in /etc/fstab. Here is an excerpt from the man page for mount:
----------
The non-superuser mounts.
Normally, only the superuser can mount filesystems. How-
ever, when fstab contains the user option on a line, any-
body can mount the corresponding system.
Thus, given a line
/dev/cdrom /cd iso9660 ro,user,noauto,unhide
any user can mount the iso9660 filesystem found on his
CDROM using the command
mount /dev/cdrom
or
mount /cd
For more details, see fstab(5). Only the user that
mounted a filesystem can unmount it again. If any user
should be able to unmount, then use users instead of user
in the fstab line. The owner option is similar to the
user option, with the restriction that the user must be
the owner of the special file. This may be useful e.g.
for /dev/fd if a login script makes the console user
owner of this device. The group option is similar, with
the restriction that the user must be member of the group
of the special file.
----------
HTH
--
.''`. Stephen Powell <zlinuxman@wowway.com>
: :' :
`. `'`
`-
Reply to: