-   Linux - Newbie (
-   -   root can only mount/umount (

snocked 08-06-2003 09:13 AM

root can only mount/umount
snocked@slackware:~$ umount /dev/cdrom
umount: only root can unmount /dev/cdrom from /mnt/cdrom

How do I grant users the ability to mount/umount?

I already tried changing the group of /dev/cdrom to users so users could mount/umount, but that didnīt work.

Mathieu 08-06-2003 09:28 AM

You need to modify the CDROM line in the /etc/fstab file.
On the line in the 4th column, there are options seperated by commas, add user.
It should look something like this:

/dev/cdrom              /mnt/cdrom              udf,iso9660 noauto,user,ro 0 0

killi 08-06-2003 09:28 AM

in /etc/fstab you got your cdrom line something like this

/dev/cdrom      /mnt/cdrom      iso9660    noauto,ro  0  0
edit to this

/dev/cdrom      /mnt/cdrom      iso9660    noauto,user,ro  0  0

killi 08-06-2003 09:29 AM

then you be able to mount and umount

snocked 08-06-2003 09:49 AM

thank you both

vincebs 04-22-2004 03:32 AM

I did this but it still doesn't work. Here is my fstab:

/dev/hdc /mnt/cdrom auto user,sync,ro,iocharset=iso8859-1 0 0

Anyone know what's missing?


spacer 04-22-2004 05:56 AM

What error are u getting ?
Also check the permissions of the directory /mnt/cdrom

silver2003 04-22-2004 08:14 AM

the mount and umount are commands, you should set new permisions for those commands that are located in /bin/mount and /bin/umount.

To change the permisions you use the following command :

chmod 777 /bin/mount /bin/umount

and now every user of your machine can mount and umount.

And try to change the owner of those comands.

OR try to copy this comands from /bin/mount /bin/umount to /usr/bin.


vincebs 04-22-2004 01:34 PM

I don't understand, why do regular users need write permission to use mount and umount? Right now they're both set at -rwsr-xr-x (4755)

My /mnt/cdrom directory is set at drwxr-xr-x (755)

My error message was:
umount: only root can unmount /dev/hdc from /mnt/cdrom

Muzzy 04-22-2004 02:52 PM

If root mounted it in the first place, then only root can unmount it, I believe.

All times are GMT -5. The time now is 01:05 PM.