Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 75154

Summary: udev cdrom permissions redundant?
Product: Gentoo Linux Reporter: Mark <callipygous>
Component: [OLD] Core systemAssignee: Greg Kroah-Hartman (RETIRED) <gregkh>
Status: RESOLVED INVALID    
Severity: normal CC: genstef, radek
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Mark 2004-12-21 02:05:08 UTC
udev sets the permissions of /dev/cdrom and /dev/cdroms/cdrom0 to root:cdrom as usual but as they are symlinks to /dev/hdc on my ide machine... 

burrito% eject /dev/cdrom
eject: unable to open `/dev/hdc'

where /dev/hdc 's permissions are 
brw-rw----  1 root root

giving errors such as that above
Comment 1 Stefan Schweizer (RETIRED) gentoo-dev 2004-12-21 02:16:19 UTC
There have been virious discucssions over this. See the linux-hotplug-devel list for details. It should work wiuth the latest udev, what version do you use? Can you please try the ~x86 version?
Comment 2 Mark 2004-12-21 02:51:16 UTC
tried the latest udev version, 50, was using 45 ... same problem, only now /dev/cdrom and /dev/cdroms/cdrom0 have permissions root:root as well as /dev/hdc, though this makes little difference either way, being only symlinks ...
Comment 3 Stefan Schweizer (RETIRED) gentoo-dev 2005-01-28 13:29:42 UTC
Can you please try to run udevstart?

on my system its like this:

 # ls /dev/hdc -l
brw-rw----  1 root root 22, 0 Jan 28 12:44 /dev/hdc
 # udevstart
 # ls /dev/hdc -l
brw-rw----  1 root disk 22, 0 Jan 28 12:44 /dev/hdc
Comment 4 Mark 2005-01-28 13:53:05 UTC
Ran udevstart and did an ls -la /dev/hdc and the permissions are fixed!! 
brw-rw----  1 root cdrom 22, 0 Nov 18 08:35 /dev/hdc

excellent, thanks :D 

But what exactly was happening?
Comment 5 Stefan Schweizer (RETIRED) gentoo-dev 2005-01-28 13:55:41 UTC
I dont know why the permissions are root:root at the beginning and you need to run udevstart ..
maybe someone else has overridden the permissions, maybe the cdrom detection did not work when the system was started?
however, it sucks to have to run udevstart after every boot/reboot to get :cdrom as group
Comment 6 Mark 2005-01-28 14:17:19 UTC
Oh, so I have to run udevstart after every boot? dang. I thought it was fixed for a second there.  

Is this behaviour common for udev?  I mean, I could write a script to run udevstart for me, but that would just be a bandaid fix. 

Is there nothing I can set in /etc/udev to change this?

Thanks
Comment 7 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-01-29 09:09:10 UTC
No, that means something like pam or something else is modifying your permissions of the device, and it's not a udev problem.  Take a look and see if pam is doing this.