Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
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.
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!!!
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?
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?
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.