LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices



Reply
 
Search this Thread
Old 01-18-2004, 10:57 PM   #1
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
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.
 
Old 01-18-2004, 11:03 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
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
 
Old 01-18-2004, 11:28 PM   #3
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Original Poster
Rep: Reputation: 45
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?
 
Old 01-18-2004, 11:31 PM   #4
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
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=...
 
Old 01-19-2004, 02:06 AM   #5
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Original Poster
Rep: Reputation: 45
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.
 
Old 01-19-2004, 02:39 AM   #6
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
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.

Last edited by leonscape; 01-19-2004 at 02:40 AM.
 
Old 01-19-2004, 02:57 AM   #7
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
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?
 
Old 01-19-2004, 03:02 AM   #8
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
He has fs=auto which means mount should autodetect, works well for CD-ROM and DVD.
 
Old 01-19-2004, 02:35 PM   #9
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Original Poster
Rep: Reputation: 45
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.

Last edited by Micro420; 01-20-2004 at 03:36 PM.
 
Old 01-20-2004, 03:37 PM   #10
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Original Poster
Rep: Reputation: 45
*Bump*
 
Old 01-20-2004, 06:13 PM   #11
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
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 )
 
Old 01-20-2004, 08:01 PM   #12
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Original Poster
Rep: Reputation: 45
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
 
Old 01-20-2004, 08:49 PM   #13
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
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.
 
Old 01-21-2004, 12:57 AM   #14
synapse
Member
 
Registered: Jan 2004
Location: On Planet Earth.
Distribution: Slackware 12
Posts: 244

Rep: Reputation: 30
Hi
out of interest what is your output to just the mount command ?

ie >mount

thanx
 
Old 01-21-2004, 02:13 AM   #15
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Original Poster
Rep: Reputation: 45
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mount cd/dvd -rom,change permission darkangel29 Linux - Newbie 10 04-16-2005 02:24 AM
permission denied! floppy cd-rom dvd-rom HELP! OMEGA-DOOM Linux - Software 17 10-15-2004 06:40 PM
DVD-ROM/CD-ROM unable to recognize debain boot CD gottfried Linux - Newbie 2 01-20-2004 01:39 PM
how to add cd-rom, dvd-rom, floppy, hard disk icons on gnome desktop? spyghost Linux - Software 6 09-21-2003 06:44 PM
DVD-ROM not detected CD-RW mistaken as CD-ROM Device DarkXtar Slackware 21 06-02-2003 08:58 PM


All times are GMT -5. The time now is 02:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration