Click to See Complete Forum and Search --> : /etc/fstab problems
sledge_hmr
06-25-2001, 05:38 PM
I am running Slackware 7.1 and can't mount my floppy drive (/dev/fd0), my zip drive (/dev/hdb), cdrom drives (/dev/scd0 and /dev/scd1) as any user other than root. I know this has to do with the /etc/fstab file, but I don't know how to append it to make it work. I've searched the boards, but everything I come across doesn't seem to work.
Please help.
bdg1983
06-25-2001, 06:01 PM
Have you tried
/dev/hda1 /mnt/windows auto user
,defaults 0 0
If each mount point has owner, then change to user.
sledge_hmr
06-25-2001, 06:19 PM
I've tried that and it still doesn't work--rebooted and everything. Here's my /etc/fstab file:
/dev/hda2 swap swap defaults 0 0
/dev/hda1 / ext2 defaults 1 1
/dev/hda6 /home ext2 defaults 1 1
/dev/hda5 /usr ext2 defaults 1 1
/dev/hda3 /fat-c vfat defaults 1 0
/dev/hda7 /fat-d vfat defaults 1 0
/dev/hdb /mnt/zip auto user,defaults 0 0
/dev/fd0 /mnt/floppy auto user,defaults 0 0
/dev/scd0 /mnt/cdrom1 auto user,defaults 0 0
/dev/scd1 /mnt/cdrom2 auto user,defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
The error I receive is:
mount: only root can do that
What is going on?
Please help!
Linuxcool
06-25-2001, 11:42 PM
Try changing your floppy line to this:
/dev/fd0 /mnt/floppy vfat user,noauto 0 0
This will set up your floppy for file type vfat, no automatically mounting at boot up, and any user can mount/unmount the floppy. If this works, then we'll check out your other entries.
sledge_hmr
06-26-2001, 12:54 AM
Okay, I tried that, but I still get the following message:
mount: only root can do that
and fail to mount the desired device.
I've check the file permissons for /bin/mount and all users and groups have the ability to execute it. I have absolutely no idea what to do. :confused:
Xsecrets
06-26-2001, 04:31 AM
not sure but have you checked the permisions on those devices /dev/sdb etc?
sledge_hmr
06-26-2001, 10:17 AM
Okay, I just checked the file permissions on the devices I want to mount. I used ls -l and received the following output:
brw-r----- 1 root disk 3, 64 Apr 27 1995 hdb
brw-rw---- 1 root floppy 2, 0 May 14 1996 fd0
brw-r----- 1 root disk 11, 0 Jul 18 1994 scd0
brw-r----- 1 root disk 11, 1 Jul 18 1994 scd1
Do these file permissions mean that there is a problem?
ille_pugil42
06-26-2001, 10:53 AM
just a hunch... perhaps your users cannot use the command 'mount'... otherwise, I've setup my /etc/fstab similar to yours and all users can mount umount, etc
sledge_hmr
06-26-2001, 11:33 AM
I have checked my file permissions for /bin/mount and have the following:
-rwsr-xr-x 1 root bin 60912 Jun 97 2000 /bin/mount
Doesn't this give everyone the ability to execute the mount command?
ille_pugil42
06-26-2001, 11:51 AM
yeah, I belive so.
ille_pugil42
06-26-2001, 11:53 AM
try this...
in /etc/fstab
/dev/fd0 /mnt/floppy auto defaults 0 0
ille_pugil42
06-26-2001, 11:53 AM
try this...
in /etc/fstab
/dev/fd0 /mnt/floppy auto defaults 0 0
otherwise, everything else looks fine. (take in mind, however, that I'm not in front of my slack box - I'm at work in front of win98 so this is all from memory)
sledge_hmr
06-26-2001, 11:55 AM
So why do I still get themount: only root can do that message? :(
I feel like I am banging my head against a brick wall. All I want to do is allow users to mount the floppy, zip, and cdrom drives. I still can't figure out what's wrong! HELP!
sledge_hmr
06-26-2001, 12:00 PM
/etc/fstab was originally set as /dev/fd0 /mnt/floppy auto defaults 0 0 and it did not work. I keep getting the same damn message:
mount: only root can do that
Damn LINUX. :mad:
[ 26 June 2001: Message edited by: sledge_hmr ]
ille_pugil42
06-26-2001, 12:54 PM
[desperatly wanting to help...but pulling at straws]
how about the permissions for the mount points themselves? i.e. /mnt/floppy. do users have access to r/w in there?
sledge_hmr
06-26-2001, 12:57 PM
To everyone that helped, Thank you! I finally figured it out...
As root I would always mount my floppy using mount /dev/fd0 /mnt/floppy. However, when I used this same command a user, linux would return a "mount: only root can do that" message. I tried mounting my floppy using mount /dev/fd0 and there were no problems.
I feel really stupid for not trying this earlier, but what can I say... I'm a newbie.
For others that are interested my /etc/fstab file looks like:
/dev/hda2 swap swap defaults 0 0
/dev/hda1 / ext2 defaults 1 1
/dev/hda6 /home ext2 defaults 1 1
/dev/hda5 /usr ext2 defaults 1 1
/dev/hda3 /fat-c vfat defaults 1 0
/dev/hda7 /fat-d vfat defaults 1 0
/dev/hdb /mnt/zip auto rw,user,noauto 0 0
/dev/fd0 /mnt/floppy auto rw,user,noauto 0 0
/dev/scd0 /mnt/cdrom1 auto ro,user,noauto 0 0
/dev/scd1 /mnt/cdrom2 auto ro,user,noauto 0 0
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
Thanks again.
:)
sledge_hmr
06-26-2001, 01:03 PM
Special thanks to ille_pugil42 for really trying to help me!
ille_pugil42
06-26-2001, 01:58 PM
Hey, I've been there too. Now, my memory is failing me by sitting in front of winblows all day long at work... :(