Re: mount floppy
On Tue, 18 Dec 2001, Tom Allison wrote:
>I'm running into a rights issue with mounting floppies as a non-root user.
>bash-2.05a$ ls -l /dev/fd0 && ls -l / | grep floppy && grep fd0 /etc/fstab
>brwxrwx--- 1 root floppy 2, 0 Jul 23 21:46 /dev/fd0
>drwxrwxr-x 2 root root 4096 Nov 30 2000 floppy
>/dev/fd0 /floppy auto user 0 0
>I am a member of group floppy.
With the rights shown as above, you have direct access rights to the floppy
device and you could use mtools (mcopy, mdir, etc.) to access the floppy.
However, mount does not care this, because in that case the reader will
always be kernel filesystem driver, which always has rights to any device.
What mount cares about, is if you have permission to _mount_ the floppy.
Mount permissions are described in /etc/fstab, so this is the file you
should be examining at problems.
>"mount -t vfat /dev/fd0 /floppy" and still nothing
You can never mount arbitrary filesystems directly if not root; instead
you can use only filesystems described in /etc/fstab. In this
particular case, /etc/fstab should include line like
/dev/fd0 /floppy auto noauto,user 0 0
The "user" flag is important: it tells that an ordinary user can mount
the filesystem (I don't know if it is possible to specify that any
user in a specific group, such as "floppy" can only mount the floppy,
probably you would need to write a wrapper script with sudo for that).
>I would like to get autmount running, but not at this rate...
I myself use automount for accessing cdrom and sometimes floppy
(usually mtools) and I'm quite statisfied with it.
You can do it by putting following lines into following files:
/auto /etc/auto.misc --timeout 5
floppy -fstype=vfat,defaults,user,noauto,exec,nodev,nosuid,ro,unhide :/dev/fd0
And then creating an empty directory /auto. I personally have a
symbolic link /mnt/floppy -> /auto/floppy so that I can cd to /mnt/floppy
and use Tab for completion on command line, or just clicking the link with
some GUI program.
Then you have just to start automount, "/etc/rc.d/automount start"
in Debian, I think.