You are not logged in.

#1 2011-10-30 03:19:00

Fade
Member
Registered: 2008-06-27
Posts: 15

[solved]Only root user has access to DVD device

The problem: Only the root user can access the DVD device

The following things will fail when run as a normal user, but will work as root (except VLC which tells I shouldn't be running it as root wink). I can install games off DVD via wine as a normal user.

vlc dvd://
Playback failure: DVDRead could not open the disc "/dev/sr0"

xine -pf dvd:/1.1
There is no input available to handle dvd:/1.1

lsdvd /dev/sr0
libdvdread: could not open /dev/sr0 with libdvdcss, can't open /dev/sr0 for reading

eject
unable to open "/dev/sr0"

The problems started occuring after the latest udev update to 174-1 (the one that said that symlinks will no longer be created, access to optical storage etc is handled by upstream rules.

I have the following rule in /etc/udev/rules.d/00-myrules.rules:

KERNEL=="sr0", SYMLINK+="dvd", GROUP="optical"

Relevant line of fstab is:

/dev/sr0 /media/dvd auto rw,user, noauto,unhide 0 0

User is also a member of the optical group. I have no idea where to go from here, so any help will be appreciated.

Last edited by Fade (2011-10-30 04:39:28)

Offline

#2 2011-10-30 03:25:10

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,354

Re: [solved]Only root user has access to DVD device

Can you post the output of ls -l /dev/sr0 and of groups whilst logged in as your user?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2011-10-30 03:39:04

Fade
Member
Registered: 2008-06-27
Posts: 15

Re: [solved]Only root user has access to DVD device

groups
wheel video audio optical storage users fade

ls -l /dev/sr0
brw-rw---- 1 root disk 11, 0 Oct 30 12.37 /dev/sr0

Offline

#4 2011-10-30 04:12:57

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,354

Re: [solved]Only root user has access to DVD device

I've noticed that my system recently changed in the same way. 
The quick and dirty solution is to add your user to the disk group.

I am using systemd, and I don't know if that is significant to this or not.
Clearly, your udev rule is not working as you expect


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2011-10-30 04:30:56

Fade
Member
Registered: 2008-06-27
Posts: 15

Re: [solved]Only root user has access to DVD device

You're a legend. That fixed it. Thank you very much. Did I miss an announcement about optical drives being part of the disk group?

Last edited by Fade (2011-10-30 04:39:00)

Offline

#6 2011-10-30 04:47:19

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved]Only root user has access to DVD device

Fade wrote:

You're a legend. That fixed it. Thank you very much. Did I miss an announcement about optical drives being part of the disk group?

Maybe it was the last udev update?
http://mailman.archlinux.org/pipermail/ … 21795.html

http://projects.archlinux.org/svntogit/ … 23051db1ff

+ echo "We now use upstream rules for assigning devices to the 'disk', 'optical',"
+ echo "'scanner' and 'video' groups. Beware of any changes."

@ewaller
Why would you call the solution 'dirty'?

Last edited by karol (2011-10-30 04:48:17)

Offline

#7 2011-10-30 04:58:38

Fade
Member
Registered: 2008-06-27
Posts: 15

Re: [solved]Only root user has access to DVD device

I did see that in the pacman.log (which was why I created the rule mentioned in my original post). Now that I read that a bit closer it looks like we have to have explicit udev rules to assign devices to those groups? I guess that would make sense for less common hardware that you want to assign to those groups, but I'm not sure I understand why the optical drive is now part of the disk group. Or am I way off here with my reasoning here?

Offline

#8 2011-10-30 05:02:29

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,354

Re: [solved]Only root user has access to DVD device

karol wrote:

@ewaller
Why would you call the solution 'dirty'?

Because:

brw-rw---- 1 root disk  8,   0 Oct 26 22:49 /dev/sda
brw-rw---- 1 root disk  8,   1 Oct 26 22:49 /dev/sda1
brw-rw---- 1 root disk  8,   2 Oct 26 22:49 /dev/sda2
brw-rw---- 1 root disk  8,   3 Oct 26 22:49 /dev/sda3
brw-rw---- 1 root disk  8,   5 Oct 26 22:49 /dev/sda5
brw-rw---- 1 root disk  8,   6 Oct 26 22:49 /dev/sda6
brw-rw---- 1 root disk  8,   7 Oct 26 22:49 /dev/sda7
brw-rw---- 1 root disk  8,   8 Oct 26 22:49 /dev/sda8
brw-rw---- 1 root disk  8,   9 Oct 26 22:49 /dev/sda9
crw------- 1 root root 10, 231 Oct 26 22:49 /dev/snapshot
brw-rw---- 1 root disk 11,   0 Oct 29 15:13 /dev/sr0
lrwxrwxrwx 1 root root      15 Oct 26 22:49 /dev/stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root      15 Oct 26 22:49 /dev/stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root      15 Oct 26 22:49 /dev/stdout -> /proc/self/fd/1

It gives group 0x6 permissions for all the drives and partitions to the disk group


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2011-10-30 05:07:12

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved]Only root user has access to DVD device

ewaller wrote:
karol wrote:

@ewaller
Why would you call the solution 'dirty'?

It gives group 0x6 permissions for all the drives and partitions to the disk group

Ah yes, that was the security concern folks were talking about in similar threads.

Offline

Board footer

Powered by FluxBB