LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   mount cdrom does not work (https://www.linuxquestions.org/questions/slackware-14/mount-cdrom-does-not-work-502455/)

kookie 11-17-2006 05:20 AM

mount cdrom does not work
 
I have tried to mount my cdrom drive as a user and get the following error message:

Code:

mount /dev/hdc /media/cdrom
mount: must be superuser to use mount

I run this as root and the drive mounts fine.
I'm currently running Slackware with kernel 2.6.17.13 with udev support. I have turned off rc.hotplug from /etc/rc.d

my fstab is as follows

Code:

/dev/hda2        swap            swap        defaults        0  0
/dev/hda5        /                reiserfs    defaults        1  1
/dev/hda1        /boot            ext3        defaults        1  2
/dev/hda6        /video          jfs        defaults        1  2
/dev/hdb1        /backup          reiserfs    defaults        1  2
/dev/cdrom      /media/cdrom    auto        ro,noauto,user,exec  0  0
/dev/fd0        /media/floppy    auto        noauto,user      0  0
devpts          /dev/pts        devpts      gid=5,mode=620  0  0
proc            /proc            proc        defaults        0  0

The permissions on my /dev/cdrom* is as follows:

Code:

ls -al /dev |grep cdrom
lrwxrwxrwx  1 root root          6 2006-11-17 21:54 cdrom -> cdrom0
lrwxrwxrwx  1 root root          3 2006-11-17 21:54 cdrom0 -> hdc
brw-rw----  1 root cdrom  22,  0 2006-11-18 08:53 hdc

Permissions on the directory
Code:

ls -al |grep cdrom
lrwxrwxrwx  1 root users  6 2006-10-18 03:36 cdrom -> cdrom0
drwxrwxr-x  2 root users  48 2006-09-26 10:50 cdrom0
drwxrwxr-x  2 root users  48 2006-09-26 10:50 cdrom1

I have tried everything i can think of and no solution. Thanks in advance.

gegechris99 11-17-2006 05:40 AM

Permission of /dev/hdc are such that only root user or a user belonging to group "cdrom" can access the cdrom.

So either add your user to group "cdrom" (see adduser man pages) or change permission of /dev/hdc.

To change permission of /dev/hdc, type in as root

chmod 666 /dev/hdc

then type in as your user:

mount /media/cdrom

It should be fine

titopoquito 11-17-2006 05:47 AM

Quote:

Originally Posted by kookie
I have tried to mount my cdrom drive as a user and get the following error message:

Code:

mount /dev/hdc /media/cdrom
mount: must be superuser to use mount


Just omit the /dev/hdc:
Code:

$ mount /media/cdrom

rkrishna 11-17-2006 06:36 AM

Quote:

mount /dev/hdc /media/cdrom
as titopoquito said the mount command is not proper
you can either give "mount /media/cdrom"
or the full manual command as root like, "mount -t iso9660 /dev/hdc /media/cdrom"

also dont change /dev permissons
IMPORTANT i found that there are unwanted simlinks pointing to your cd drive /dev/hdc please remove all the simlinks to /dev/hdc and please make a new one like "ln -sf /dev/hdc /dev/cdrom"

kookie 11-17-2006 07:21 AM

I've tried all of the above suggestions and have still come up with the same error of :

Code:

mount: must be superuser to use mount
i've noticed that everytime the computer has been restarted udev rewrites the permissions and symlinks in the /dev directory.

titopoquito 11-17-2006 07:48 AM

Have you somehow changed the permissions of /bin/mount?

Code:

-rwsr-xr-x 1 root root 60576 2006-09-25 10:48 /bin/mount

kookie 11-17-2006 07:54 AM

Quote:

Originally Posted by titopoquito
Have you somehow changed the permissions of /bin/mount?

Code:

-rwsr-xr-x 1 root root 60576 2006-09-25 10:48 /bin/mount


How do you reset the permission for mount.
I'm not sure how you got the rws???

kookie 11-17-2006 07:58 AM

Thank.

Its working now. Not sure what happen to the permissions on the mount and umount command.
I fixed this up and now i can mount the drive as a user. Thanks guys for all your help.


All times are GMT -5. The time now is 11:52 PM.