[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: mounting floppy in read/write mode by user

On Tue, 2005-09-20 at 16:29 -0500, akonstam trinity edu wrote:
> On Tue, Sep 20, 2005 at 11:45:59AM -0500, Mike McCarty wrote:
> > Deepak Shrestha wrote:
> > >Hi,
> > >
> > >In my FC4, I have made a link to floppy device (KDE)
> > >but coundn't mount it (in user mode). when I try to
> > >mount the floppy, KDE ends up with error
> > >
> > >-------------------------
> > >Could not mount device
> > >
> > >The reported error was
> > >
> > >mount: I couln't determine the the filesystem type,
> > >and none was specified

How did you mount it?  There are 2 forms of the command.  One uses the
fstab entry and works as a user and one does not.  

If you use the form "mount <mountpoint>" the mount command looks at the
entry in fstab and a standard user on the console should be able to
mount it.  I use "mount /media/floppy" and it works.

If instead you use the long form "mount <device> <mountpoint>" it also
requires the "-t" option to specify the filesystem type "mount -t
<filesystem> <device> <mountpoint>". Using this form as a normal user
without the "-t" gives the error you see.  With the "-t" it will tell
you that only root can mount (unless you are already root).  Note that
as root you often do not need the -t, this seems to be part of the
security features built into the mount command for verifying privileges
for a user.

> > >-------------------------
> > >
> > >but if i mount it from command line in su mode its
> > >fine. it seems like users are not permitted. how do I
> > >make the users be able to mount the flopy in
> > >read/write mode?
> > >
> > >my fstab looks like this
> > >------
> > >/dev/fd0                /media/floppy           auto  
> > > pamconsole,exec,noauto,managed 0 0
> > >/dev/hdd                /media/cdrecorder       auto  
> > > pamconsole,exec,noauto,managed 0 0
> > >---------
> > >
> > >I wonder why my cdwriter is working perfectly in user
> > >mode. It can burn CDs without any error.
> > 
> > The burner program probably runs suid root.
> > 
> > >
> > >Any Suggestion?
> > 
> > Try editing /etc/fstab (as root) to have ",user" after
> > ",managed"
> > 
> > Mike
> Boy am I confused. I hope some one can straighten this out:
> 1. the user option allows users to mount. See man fstab for that
> information.
Yes, both "user" and "users" do that (with differences in the effects),
but apparently so does the pamconsole option.  I tested it with/without
that option and sure enough, when the option is not on the line it only
allows root to mount the device.  When the option is on the line the
user on the console can mount it.

> 2. Since the /dev/fd0 is managed, which means that it is managed by
> fstab-sync and option you add like user to the fstab file will
> disappear the next time you reboot. You need to have user added
> through entries in the fstab-sync i(or hal) related files.
If you want to make changes on the line and make it stick, one way is to
remove the "managed" option on the line.  That stops udev/HAL/fstab-sync
from rewriting the fstab line for that device. 

> 2. Now the clincher. My fstab entry looks just like the one above and
> I can mount /media/floppy as a normal user. So my confusion.
Mine looks exactly the same and I can also mount/unmount both floppies
and CDROMs on my system.

> Or I am all wet and someone will correct me.
> -- 
> =======================================================================
> By protracting life, we do not deduct one jot from the duration of death.
> 		-- Titus Lucretius Carus
> -------------------------------------------
> Aaron Konstam
> Computer Science
> Trinity University
> telephone: (210)-999-7484

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]