LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-27-2004, 04:18 PM   #1
r3dhatter
Member
 
Registered: Dec 2003
Distribution: Debian (testing)
Posts: 210

Rep: Reputation: 30
Getting DVD to play as non-root


Hi,

I have a CDRW and DVD player. I want the dvd player to play my music/videos/games and the CDRW will be used for burning cds and opening data cds.

I am not sure if I should use chmod or the chgrp command.

I don't need to change the group or chmod the CDRW as I can mount it since it is working and in my fstab already. I just want to make the DVD player play as a non-root user now.

chgrp cdrom hda

Or

chgrp cdrom0 hda

Or

chmod 666 /dev/hda


What is my best option here??


------- DVD-ROM and CDRW Information --------

hda = DVD
hdb = CDRW

/dev/cdrom = dvd
/dev/cdrom1 = cdrw

ls -l /dev/hdb
brw-rw---- 1 root disk 3, 64 Apr 29 17:27 /dev/hdb

ls -l /dev/hda
brw-rw---- 1 root disk 3, 0 Apr 29 17:27 /dev/hda

ls -l /dev/cdrom
lrwxrwxrwx 1 root root 11 Jul 27 00:34 /dev/cdrom -> /dev/cdrom0

ls -l /dev/cdrom1
lrwxrwxrwx 1 root root 8 Jul 27 00:34 /dev/cdrom1 -> /dev/hdb

--------- FSTAB ---------
/dev/hdb /media/cdrom iso9660 ro,user,noauto 0 0
/dev/hdb /media/cdrom0 iso9660 ro,user,noauto 0 0
/dev/hda /media/cdrom1 iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy auto rw,user,noauto 0 0
/dev/hdb /cdrom iso9660 ro,user,noauto 0 0


Thanks
 
Old 07-27-2004, 05:06 PM   #2
netcrusher88
LQ Newbie
 
Registered: Jul 2004
Distribution: Debian-sid, Knoppix
Posts: 25

Rep: Reputation: 15
Not quite sure, but I think that the best thing to do would be to make a group (or use the cdrom one, whatever) and assign it to own hda, hdb, cdrom, cdrom0, and cdrom1, and then add all users that you want to be able to play DVDs to that group. Since the aforementioned devices are already group-readable, that should make any user in the assigned group able to play CDs, DVDs, and any other thing that requires low-level device access as opposed to file system access. That should work, and create less of a security hole than setting the player SUID root or whatever. BTW, I personally would use only one group for DVD and CD, but if you would like to use separate groups, go ahead, just follow above steps twice, substituting the proper device and group names where needed.
 
Old 07-27-2004, 06:46 PM   #3
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
What are the permissions of /dev/cdrom0 (that's what /dev/cdrom is symlinked to?) if they aren't allowing user read/write then chmod it so it does.
 
Old 07-27-2004, 10:30 PM   #4
r3dhatter
Member
 
Registered: Dec 2003
Distribution: Debian (testing)
Posts: 210

Original Poster
Rep: Reputation: 30
ls -l /dev/cdrom0

lrwxrwxrwx 1 root root 8 Jul 27 08:23 /dev/cdrom0 -> /dev/hda
 
Old 07-27-2004, 11:44 PM   #5
r3dhatter
Member
 
Registered: Dec 2003
Distribution: Debian (testing)
Posts: 210

Original Poster
Rep: Reputation: 30
bump
 
Old 07-29-2004, 11:35 AM   #6
r3dhatter
Member
 
Registered: Dec 2003
Distribution: Debian (testing)
Posts: 210

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Komakino
What are the permissions of /dev/cdrom0 (that's what /dev/cdrom is symlinked to?) if they aren't allowing user read/write then chmod it so it does.
If I do that, will there be any security issues? According to the Red Hat guide about chmod it will loosen security a little. I was trying to use the chgrp command, but I can't figure out how to do it for both the DVD and the CDRW. So, I think I will just use the chmod command.
 
Old 07-29-2004, 12:42 PM   #7
linuxlastslonge
Member
 
Registered: Jun 2002
Location: Franklin, IN
Distribution: Debian, CentOS, Mac OS X
Posts: 158

Rep: Reputation: 30
woah! i don't think editing the device properties directly is a very good idea. just change the options in /etc/fstab to allow non-root users to mount/umount the device.
 
Old 07-29-2004, 02:01 PM   #8
r3dhatter
Member
 
Registered: Dec 2003
Distribution: Debian (testing)
Posts: 210

Original Poster
Rep: Reputation: 30
How do I do that?

Here's the fstab

/dev/hdb /media/cdrom iso9660 ro,user,noauto 0 0
/dev/hdb /media/cdrom0 iso9660 ro,user,noauto 0 0
/dev/hda /media/cdrom1 iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy auto rw,user,noauto 0 0
/dev/hdb /cdrom iso9660 ro,user,noauto 0 0
 
Old 07-29-2004, 02:24 PM   #9
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Quote:
Originally posted by linuxlastslonge
woah! i don't think editing the device properties directly is a very good idea. just change the options in /etc/fstab to allow non-root users to mount/umount the device.
That's not what I meant....although in any case, you're being a little paranoid when we're talking about a single user home system!

If it was actually to do with fstab then I'd agree with you, but I've encountered this problem before (if I've understood correctly) which is regarding mplayer. MPlayer doesn't mount the device like a normal user would, it accesses it directly. Hence to get my friend's DVD drive to play DVD's in Mplayer we had to first of all change his /dev/dvd symlink to point to the correct drive, and secondly make that drive read and writable by normal users. Now think about this...it's hardly a security concern as it's a DVD-Rom drive...so at the worst someone could hack him and watch his Flintstones collection.....ooooheeerrrrr!!!
 
Old 07-29-2004, 02:28 PM   #10
linuxlastslonge
Member
 
Registered: Jun 2002
Location: Franklin, IN
Distribution: Debian, CentOS, Mac OS X
Posts: 158

Rep: Reputation: 30
i'm just curious.... what is the reason behind giving world write access to the dvd-rom device? shouldn't you just have owner/group/world read&execute?
 
Old 07-29-2004, 02:34 PM   #11
r3dhatter
Member
 
Registered: Dec 2003
Distribution: Debian (testing)
Posts: 210

Original Poster
Rep: Reputation: 30
chgrp cdrom /dev/hdb
chgrp cdrom /dev/cdrom0

chgrp cdrom /dev/hda
chgrp cdrom /dev/cdrom1

Will that work? I am not sure if that will work because then hdb and hda would be in the same group called cdrom ....
 
Old 07-29-2004, 03:17 PM   #12
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Quote:
Originally posted by linuxlastslonge
i'm just curious.... what is the reason behind giving world write access to the dvd-rom device? shouldn't you just have owner/group/world read&execute?
No purpose, just habit
 
Old 07-29-2004, 03:57 PM   #13
r3dhatter
Member
 
Registered: Dec 2003
Distribution: Debian (testing)
Posts: 210

Original Poster
Rep: Reputation: 30
Quote:
chgrp cdrom /dev/hdb
chgrp cdrom /dev/cdrom0

chgrp cdrom /dev/hda
chgrp cdrom /dev/cdrom1

Will that work? I am not sure if that will work because then hdb and hda would be in the same group called cdrom ....
will the above situation I posted work?

Thanks
 
Old 08-02-2004, 04:24 AM   #14
xp1o1d5
LQ Newbie
 
Registered: Jul 2004
Posts: 23

Rep: Reputation: 15
I need some help i have a cd drive in my comp! i knew how to access the cd in it by- mount /cdrom -but since i added a dvd drive and burner and now i have to put a cd in the dvd drive to mount it! cause i dont know how to install the other drives! I know that the hard drive is primary master and the burner is primary slave! and the dvd is secondary master and the cd-drive is secondary slave!
I hope i aint confused anyone to much! anyhelp would be appreciated!




home.earthlink.net/~sa7ura73d

Last edited by xp1o1d5; 08-02-2004 at 04:25 AM.
 
  


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
which DVD player can play DVD from hard drive *and* support DVD Menu ? tho_x_tran Linux - Software 16 11-16-2006 02:00 PM
Kaffeine, won't play a DVD but will play individual VOB files? GameGuru Linux - Newbie 12 07-08-2005 12:33 AM
Every DVD Player Fails to Play DVD Movie in SuSE 9.2 Pro....Please Help ! ! ! bedi-beparwah SUSE / openSUSE 2 03-14-2005 06:08 PM
dvd-rom drive won't play movies and dvd burner won't record calble Linux - Hardware 1 08-09-2004 07:35 AM
combo rom won't read/play dvd, no ans from dvd-howto sirpelidor Linux - Hardware 0 12-22-2003 11:20 AM


All times are GMT -5. The time now is 02:54 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration