You are not logged in.

#1 2011-11-04 19:33:34

Wildy
Member
Registered: 2011-04-23
Posts: 11

CD Drive Permission Errors

A little while ago I made the mistake of doing a pacman update (AFAIK there were no problems mentioned in the news archive). After that I was no longer able to use the CD drive (SATA). Turns out it was some permission error, and after a permission change I was able to use my CD drive again.

Haven't used it since then, and went to use it this morning and I got the exact same error - unfortunately I couldn't find the solution I found the first time, hence why I'm asking here.

The error I get is:

$ abcde
Executing customizable pre-read function... done.
Getting CD track info... cd-discid: /dev/sr0: open: Permission denied
[ERROR] abcde: CD could not be read. Perhaps there's no CD in the drive?
$ sudo abcde
Password:
[ERROR] abcde: CDROM has not been defined or cannot be found



$ groups mike
wheel video audio optical storage power users
$ ls -l /dev/sr0
brw-rw---- 1 root disk 11, 0 Nov  4 19:24 /dev/sr0

I know that the CD drive is working correctly as I am able to eject it via software, albeit only when using sudo.


Any ideas what's wrong with my permissions?

Last edited by Wildy (2011-11-04 19:34:15)

Offline

#2 2011-11-04 19:39:39

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: CD Drive Permission Errors

/dev/sr0 used to be in the optical group, now it's in disk. It's a known issue, and probably a bug. Until it gets fixed, create /etc/udev/rules.d/82-cdrom.rules with this:

SUBSYSTEMS=="scsi", KERNEL=="sr0", GROUP="optical", SYMLINK+="cdrom dvd"

Then, I don't know if rebooting is strictly necessary, but it's the sure way. So reboot.

Offline

#3 2011-11-04 19:47:15

Wildy
Member
Registered: 2011-04-23
Posts: 11

Re: CD Drive Permission Errors

That worked a treat, thank you very much. If I understand udev rules correctly, the number refers to the order it is loaded in. Why 82 out of interest?

Offline

#4 2011-11-05 04:22:21

rogue
Member
Registered: 2011-08-03
Posts: 68
Website

Re: CD Drive Permission Errors

Taken from hackaday:

Files should be named xx-descriptive-name.rules, the xx should be chosen first according to the following sequence points:

< 60  most user rules; if you want to prevent an assignment being overriden by default rules, use the := operator. these cannot access persistent information such as that from vol_id

< 70  rules that run helpers such as vol_id to populate the udev db

< 90  rules that run other programs (often using information in the udev db)

>=90  rules that should run last

82 is probably just from the file name that he copied it from. It does not matter as long as it stays within the range guidelines posted above.

Last edited by rogue (2011-11-07 04:52:24)

Offline

#5 2011-11-06 23:36:31

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: CD Drive Permission Errors

Gusar wrote:

/dev/sr0 used to be in the optical group, now it's in disk. It's a known issue, and probably a bug. Until it gets fixed, create /etc/udev/rules.d/82-cdrom.rules with this:

SUBSYSTEMS=="scsi", KERNEL=="sr0", GROUP="optical", SYMLINK+="cdrom dvd"

Then, I don't know if rebooting is strictly necessary, but it's the sure way. So reboot.

This is indeed a bug which will be fixed in udev-175. If you want the fix from upstream it is to use the following rule:

SUBSYSTEM=="block", KERNEL=="sr[0-9]*". GROUP="optical"

Offline

#6 2011-11-07 04:13:21

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: CD Drive Permission Errors

tomegun wrote:
Gusar wrote:

/dev/sr0 used to be in the optical group, now it's in disk. It's a known issue, and probably a bug. Until it gets fixed, create /etc/udev/rules.d/82-cdrom.rules with this:

SUBSYSTEMS=="scsi", KERNEL=="sr0", GROUP="optical", SYMLINK+="cdrom dvd"

Then, I don't know if rebooting is strictly necessary, but it's the sure way. So reboot.

This is indeed a bug which will be fixed in udev-175. If you want the fix from upstream it is to use the following rule:

SUBSYSTEM=="block", KERNEL=="sr[0-9]*". GROUP="optical"

Well, nothing is working in Thunar anymore except the arch partition.  Can't access any of my other partitions or optical drive.  Tried the udev rule above and rebooted.  Added my user to the group 'disk'.  Tried changing the polkit-1 file for udisks from storage to disk.

Verified the following as well as per this report: https://bugs.archlinux.org/task/26640
Comment by Gerardo Exequiel Pozzi (djgera) - Sunday, 06 November 2011, 18:05 GMT-5
/dev/sr0 should have an ACL if you are logged via ck. (ls -l shows a "+" in mode, and getfacl /dev/sr0, must list your user with mode "rw-")
True in both instances here.  I don't think I have a consolekit issue.

Offline

#7 2012-05-22 04:16:27

sinorev
Member
Registered: 2012-03-06
Posts: 13

Re: CD Drive Permission Errors

Thank you for the tip! This solved my issue as well.

Last edited by sinorev (2012-05-22 04:16:43)

Offline

#8 2012-05-22 04:20:17

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: CD Drive Permission Errors

Closed: necrobumping https://wiki.archlinux.org/index.php/Fo … Bumping.27

(udev well past 175...)


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB