LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   How to give permission to DVD-ROM? (https://www.linuxquestions.org/questions/mandriva-30/how-to-give-permission-to-dvd-rom-136206/)

Micro420 01-18-2004 09:57 PM

How to give permission to DVD-ROM?
 
How do I give permission to read from the DVD-ROM drive?

I am unable to read any CD's in my DVD-ROM drive (/mnt/cdrom2). Bu when I stick it in my CD-RW (/mnt/cdrom) I am able to open and view files.

leonscape 01-18-2004 10:03 PM

Check your fstab and see if the options are the same for the DVD as the CD.

If that doesn't help.
What device is your DVD? Say it was /dev/hdc and the cd-rom is /dev/hdb. type this

cd /dev
ls -l /dev/hdb

You'll get something like this
brw-rw---- 1 root cdrecording 22, 0 Mar 14 2002 hdb

see cdrocording. This is the group of the device. you need to make the dvd device the same. Something like.

chgrp cdrecording hdc

Micro420 01-18-2004 10:28 PM

This is what my fstab looks like:


none /mnt/cdrom supermount dev=/dev/scd0,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0
none /mnt/cdrom2 supermount dev=/dev/hdd,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0

Is this bad?

leonscape 01-18-2004 10:31 PM

No that looks right. It my above example simply replace, hdb with scd0 and hdc with hdd.

If this doesn't work try adding users after -- so it looks like:
...fs=auto,ro,--,users,iocharset=...

Micro420 01-19-2004 01:06 AM

Quote:

Originally posted by leonscape
No that looks right. It my above example simply replace, hdb with scd0 and hdc with hdd.

If this doesn't work try adding users after -- so it looks like:
...fs=auto,ro,--,users,iocharset=...

I'm not really clear what you are trying to say. You said that my fstab looks correct. Why isn't it working then?

What and where do I add those things? Please be specific as I am a newb.

leonscape 01-19-2004 01:39 AM

Okay. Why isn't it working. Security is very impotant in Linux. So each device has permisions. If the user does not have permission to use a device then it won't work.

I currently using the assumption, that a permission is wrong somewhere for the DVD and thats why the disks won't work. I'm also assuming that the DVD is the slave device on the secondary IDE channel.

The lines in an fstab for CD-ROMS and DVDs usually look the same apart from the mount points ( /mnt/cdrom /mnt/cdrom2 ) and the devices ( /dev/scd0 /dev/hdd ). Which is what your fstab looks like.

So if its not the fstab thats causing the problem the next solution is usually the device files. To see if it is try typing these lines into a console

ls -l /dev/scd0

and

ls -l /dev/hdd

These should have the same group. something like cdrecording or cdrom etc. If their both the same group then we'll look for another solution. Changing the fstab may also work but that maybe a bad solution.

jschiwal 01-19-2004 01:57 AM

Here is an entry from my fsstab in Mandrake 9.2:
Code:

none /mnt/cdrom supermount dev=/dev/hdc,fs=udf:iso9660,ro,--,iocharset=iso8859-1 0 0
I believe that dvds use the udf file system. Do udf and isofs show up when you type lsmod as root? What does the command mount | grep cdrom show?

leonscape 01-19-2004 02:02 AM

He has fs=auto which means mount should autodetect, works well for CD-ROM and DVD.

Micro420 01-19-2004 01:35 PM

Quote:

Originally posted by leonscape
Okay. Why isn't it working. Security is very impotant in Linux. So each device has permisions. If the user does not have permission to use a device then it won't work.

I currently using the assumption, that a permission is wrong somewhere for the DVD and thats why the disks won't work. I'm also assuming that the DVD is the slave device on the secondary IDE channel.

The lines in an fstab for CD-ROMS and DVDs usually look the same apart from the mount points ( /mnt/cdrom /mnt/cdrom2 ) and the devices ( /dev/scd0 /dev/hdd ). Which is what your fstab looks like.

So if its not the fstab thats causing the problem the next solution is usually the device files. To see if it is try typing these lines into a console

ls -l /dev/scd0

and

ls -l /dev/hdd

These should have the same group. something like cdrecording or cdrom etc. If their both the same group then we'll look for another solution. Changing the fstab may also work but that maybe a bad solution.

ah! okay. Thanks for typing more out and being clear. Now I see what you're saying.
Here is what I get when I type what you told me to for /dev/scd0:

lr-xr-xr-x 1 root root 31 Jan 19 11:19 /dev/scd0 -> scsi/host0/bus0/target0/lun0/cd

And this is what I get for /dev/hdd:

lr-xr-xr-x 1 root root 30 Jan 19 11:19 /dev/hdd -> ide/host0/bus1/target1/lun0/cd

Are they in the same group? any more insights? I don't know what to do.

Micro420 01-20-2004 02:37 PM

*Bump*

leonscape 01-20-2004 05:13 PM

Quote:

Here is what I get when I type what you told me to for /dev/scd0:

lr-xr-xr-x 1 root root 31 Jan 19 11:19 /dev/scd0 -> scsi/host0/bus0/target0/lun0/cd

And this is what I get for /dev/hdd:

lr-xr-xr-x 1 root root 30 Jan 19 11:19 /dev/hdd -> ide/host0/bus1/target1/lun0/cd
These are links, What we need you to check are the targets of these links. So:

ls -l /dev/ide/host0/bus0/target0/lun0/cd

and

ls -l /dev/ide/host0/bus1/target1/lun0/cd

( Sorry no reply earlier been busy )

Micro420 01-20-2004 07:01 PM

How weird. I typed what you said in the console:


[ken@localhost lun0]$ ls -l /dev/ide/host0/bus0/target0/lun0/cd
ls: /dev/ide/host0/bus0/target0/lun0/cd: No such file or directory


and


[ken@localhost lun0]$ ls -l /dev/ide/host0/bus1/target1/lun0/cd
brw------- 1 ken cdrom 22, 64 Dec 31 1969 /dev/ide/host0/bus1/target1/lun0/cd



So how come the first one I get nothing, but the second one I get something? help! lol

leonscape 01-20-2004 07:49 PM

I entered the wrong line on the first device. I used ide instead of scsi. sorry. So the commad should of been:

ls -l /dev/scsi/host0/bus0/target0/lun0/cd

Please do this anyway as we need to check some things.

Anyway we've got the DVD's Line we can disect.
brw------- 1 ken cdrom 22, 64 Dec 31 1969 /dev/ide/host0/bus1/target1/lun0/cd

this tells us that ken owns the device and the cdrom is its group. Also its tells us that rw is only allowed to ken. Not even the group can access it. Thats a problem. So we need to change that.

chmod g+r /dev/ide/host0/bus1/target1/lun0/cd

This command ( change mode ) will add read permissions for the group ( g+r ). Now try the DVD drive again. If your logged in as ken this shouldn't be needed but maybe the program reading the DVD doesn't have permission to do so.

This set up you have is quite unusual as root is normally the owner of all devices.

synapse 01-20-2004 11:57 PM

Hi
out of interest what is your output to just the mount command ?

ie >mount

thanx

Micro420 01-21-2004 01:13 AM

Quote:

Originally posted by synapse
Hi
out of interest what is your output to just the mount command ?

ie >mount

thanx

[ken@localhost ken]$ mount
/dev/hdb1 on / type ext3 (rw)
none on /proc type proc (rw)
none on /proc/bus/usb type usbdevfs (rw)
none on /dev type devfs (rw)
/dev/hdb7 on /back2 type ext3 (rw)
none on /dev/pts type devpts (rw,mode=0620)
/dev/hdb6 on /home type ext3 (rw)
none on /mnt/cdrom type supermount (ro,dev=/dev/scd0,fs=auto,--,iocharset=iso8859-1,codepage=850,umask=0)
none on /mnt/cdrom2 type supermount (ro,dev=/dev/hdd,fs=auto,--,iocharset=iso8859-1,codepage=850,umask=0)
none on /mnt/floppy type supermount (rw,sync,dev=/dev/fd0,fs=auto,--,iocharset=iso8859-1,codepage=850,umask=0)
/dev/hda1 on /mnt/windows type ntfs (ro,iocharset=iso8859-1,umask=0)

and there you have it! anything wrong?


All times are GMT -5. The time now is 04:33 PM.