Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 100910 - questionable udev device permissions
Summary: questionable udev device permissions
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Greg Kroah-Hartman (RETIRED)
URL:
Whiteboard:
Keywords:
: 101422 102349 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-31 10:27 UTC by Steve Arnold
Modified: 2005-08-13 14:14 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Arnold archtester gentoo-dev 2005-07-31 10:27:07 UTC
In figuring out a little udev issue, I noticed some device perms that look odd, 
and at least one that just won't work.

1) Why is "cdwriter:root:disk:0660" in a different place and a different group 
from the other cd* devices?  I would say it belongs with the other optical 
devices, and should probably be "cdwriter:root:cdrom:0660" instead (unless 
there's some legacy reason why this is needed).

2) This doesn't work with gpsd, which looks for a "serial" style device, since 
the little USB gps devices use serial/USB converter widgets (and other gps 
handhelds usually have real serial ports).  Anyway, the expected group is 
"tty" and not "usb".  I think the following is inconsistent:

# console devices
console:root:tty:0600
tty:root:tty:0666
tty[0-9]*:root:tty:0660
vc/[0-9]*:root:tty:0660
tts/ttyUSB[0-9]*:root:tty:0660

and:

# serial+dialup devices
ttyS*:root:tty:0660
ippp*:root:tty:0660
isdn*:root:tty:0660
isdnctrl*:root:tty:0660
capi*:root:tty:0660
dcbri*:root:tty:0660
ircomm*:root:tty:0660
ttyUSB*:root:usb:0660
tts/[0-9]*:root:tty:0660
tts/USB[0-9]*:root:usb:0660

Since my USB/Serial GPS comes up as /dev/tts/USB0, it gets processed by the 
following rule:

tts/USB[0-9]*:root:usb:0660

and needs to be handled by a custom rule to give it root:tty instead.  IMHO, 
all USB serial devices should probably default to root:tty.  Any comments?
Comment 1 Julien Gage 2005-08-03 21:50:04 UTC
I found myself unable to use my cdroms in this release under non-root with the
new udev.

The cdrom0 and cdrom symlinks are both root:root and the hd* for it is
root:disk. None of them are grouped for cdrom or anything else usable.
Comment 2 Phil Richards 2005-08-05 02:31:12 UTC
I've had a similar problem - I can't write DVD-R's using
nautilus-cd-burner-2.10.2 (hal-0.4.8, udev-065, dbus-0.23.4-r1) as a normal user.

Nautilus (actually cdrecord) reported that it could not lock the drive to
prevent eject.

I tracked it down to:
~ # ls -l /dev/hdc
brw-r-----  1 root cdrom 22, 0 Aug  5 09:00 /dev/hdc

cdrecord is correct - it can't perform the ioctl on a read only device.

Hand changing the permission (adding g+w) fixes the problem.

Phil
Comment 3 Rob Andrews 2005-08-05 12:48:45 UTC
The cdrom permissions are similarly not working for me, also. But to add a
further piece of oddness, the behaviour of udev changes depending on the order
some modules are loaded.

Since I have a sata hard drive, I keep the ide layer modular, and load ide-cd in
/etc/modules.autoload.d/kernel-2.6. coldplug comes along after module loading
and loads via82cxxx. The cdrom device node, /dev/hda is created, but
/dev/cdroms/cdrom0 is not.

Now, if I put via82cxxx prior to ide-cd in /etc/modules.autoload.d/kernel-2.6,
/dev/cdroms/cdrom0 is symlinked correctly.

The permissions remain incorrect, however.

$ ls -l /dev/hda
brw-r-----  1 root disk 3, 0 Aug  5 19:53 /dev/hda

The version, if needed, is:

[ Searching for package 'udev' in all categories among: ]
 * installed packages
[I--] [  ] sys-fs/udev-065 (0)
Comment 4 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-08-06 12:36:13 UTC
*** Bug 101422 has been marked as a duplicate of this bug. ***
Comment 5 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-08-06 12:36:33 UTC
Will fix this for next release.
Comment 6 Petteri Räty (RETIRED) gentoo-dev 2005-08-07 12:03:11 UTC
Using udev-065 I have the following problem:

pena dev # ls -l hda
brw-r-----  1 root disk 3, 0 Aug  7 14:24 hda
pena dev # ls -l | grep dvd
lrwxrwxrwx  1 root root         3 Aug  7 22:01 dvd -> hda
lrwxrwxrwx  1 root root         3 Aug  7 22:01 dvd1 -> hdb
lrwxrwxrwx  1 root root         3 Aug  7 22:01 dvdrw -> hda
pena dev # ls -l hdb
brw-r-----  1 root disk 3, 64 Aug  7 14:24 hdb
Comment 7 Steve Arnold archtester gentoo-dev 2005-08-08 00:08:13 UTC
What happens if you connect your cd/dvd drives to the secondary controller?  On 
a normal IDE hard disk (hda/hdb) and CD/DVD (hdc/hdd) setup with no SCSI generic 
stuff I get the right perms:

brw-rw----  1 root    disk   3,  0 Aug  7 08:45 /dev/hda
brw-rw----  1 root    disk   3, 64 Aug  7 08:45 /dev/hdb
brw-rw----  1 sarnold cdrom 22,  0 Aug  7 08:45 /dev/hdc
brw-rw----  1 sarnold cdrom 22, 64 Aug  7 08:45 /dev/hdd

I also just enabled pam_console...
Comment 8 Petteri Räty (RETIRED) gentoo-dev 2005-08-08 12:05:22 UTC
(In reply to comment #7)
> What happens if you connect your cd/dvd drives to the secondary controller?  

Getting the cables nicely done is a real pain in the you know what if I use the
controllers that way and I don't actually need hdc because sda is my main drive.
In the future with sata drives I think it will be quite common that people will
have their cd/dvd drives as hda/hdb. 
Comment 9 Colin Tinker 2005-08-10 10:29:04 UTC
Version 0.65 still creates cdrom devices as root:disk instead of root:cdrom or 
root:cdrw 
Comment 10 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-08-11 16:19:03 UTC
cdrom permissions should be now fixed in the 066 release.
Comment 11 Petteri Räty (RETIRED) gentoo-dev 2005-08-11 23:28:04 UTC
(In reply to comment #10)
> cdrom permissions should be now fixed in the 066 release.

At least after running udevstart the permissions are ok.
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2005-08-13 05:05:29 UTC
*** Bug 102349 has been marked as a duplicate of this bug. ***
Comment 13 Petteri Räty (RETIRED) gentoo-dev 2005-08-13 09:54:31 UTC
After booting up I still get the wrong permissions. Running udevstart fixes the
permissions. 
Comment 14 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-08-13 09:55:30 UTC
Yeah, another udev bug, will be fixed next release...
Comment 15 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-08-13 14:14:37 UTC
Should be fixed in 067 release.