dvd drive permission problem 11.1

when i try to watch a dvd, i get an error basicly saying i dont hav permission to access the dvd drive (dev/sr0)and this occurs w/ all media players (mplayr, vlc, xine). also when i open k3b it says i have no dvd writers which is bull $h!t. so i log in as root and i can watch + burn dvds no problem, then i change the permissions on dev/sr0 and dev/dvd, log back in as a user and played the dvd and thought “I’m glad thats over”

well i was wrong becuz it wasnt over after i rebooted i wasnt able to access the drive again becuz it set itself back for only root

does anybody hav a work around besides logging in as root

Your user belongs to groups: cdrom, users, audio, disk…, right? Check in YaST2 that at least to the cdrom group it does.

Weel, if you add yourself to the group /dev/sr0 belongs (usually ‘disk’, not ‘cdrom’) you’ll have access. However, it has been stated here and elsewhere that this poses a security risk, as it gives access permission to all drives in the system for anyone with common user status, for example, a virus in a binary you just ran as a regular user. Improbable, I know, but not as much as before. And as linux gets more popular it will get worse.

A safer way was reported that involves changing udev rules. Unfortunately I don’t know the author’s name to give him due credit. His post goes like this:

Insufficient CD/DVD drive permissions on openSuSE 11.1

One of those “I should have known…” posts. I just could not get my flu-addled brain to google the problem and, I am ashamed to confess, watched DVDs on Vista instead.

* Audio CDs and video DVDs were displayed in Konqueror, but not played (and yes, I had all the codecs).
* K3b warned me about not having a burner.
* wodim --devices found nothing.

This has made the most-annoying-bug list on opensuse.org, and the developers keep bickering in the bugzilla comments. The most popular workaround seems to be to add your user to the disk group, which works, but poses an ugly security risk: disk members have raw access to all hard drives.
Pawel Stolowski on the bugzilla thread suggests changing the group ownership to cdrom for all optical drives in the udev rules:

* add your user to the cdrom group in YaST->Users and Groups.
* create (sudo) a file 99-my.rules in /etc/udev/rules.d/ containing this line:
  KERNEL=="sr*[0-9]", GROUP="cdrom", MODE="0660"
* reboot

Worked for me. There seems to be an upcoming hal etc. patch by Danny Kukawa, which ought to sort out the problem. Oh - and any cynic bastards like me out there might experience some guilty amusement over the flame wars in the bug thread.

Didn’t test it yet, but seems coherent. Hope it helps.

Don’t mess with the files in /dev; just add all the users to the ‘disk’ group. (Cdrom and all the other changes are red-herrings).

i have everything running perfect thanks guys