You are not logged in.
Pages: 1
I see that my /dev/sg0, /dev/sg1, /dev/sg2 are created on each boot with their group as root. However, my /etc/udev/rules.d/udev.rules has these lines in it:
# permissions for SCSI CD devices
BUS=="scsi", KERNEL=="sr[0-9]*", SYSFS{type}=="5", NAME="scd%n",GROUP="optical"
BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="5", NAME="%k", GROUP="optical"
What might I be doing wrong here? The first time after each boot that I run kb3, I have to manually set the group for these devices to optical so I can write to a CD.
Offline
what type does your /sys report on these devices?
Offline
what type does your /sys report on these devices?
How do I find that info? I do know that this used to work fine with Arch, and don't remember which upgrade caused this problem.
Offline
what type does your /sys report on these devices?
Oh, I think this is what you want. Here's a line from dmesg:
sr 3:0:0:0: Attached scsi generic sg3 type 5
sd 2:0:6:0: Attached scsi generic sg2 type 0
Offline
what modules are loaded?
sr_mod and sg?
Offline
what modules are loaded?
sr_mod and sg?
Both of those are loaded.
Offline
what does udevtest /block/<yourdevicenode> show?
Offline
what does udevtest /block/<yourdevicenode> show?
I'll have to test this when I get back from the office. For now I rely on rc.local to reset the groups for those devices.
How do I determine my device node?
Offline
well i don't know how they are called, i guess it's sr or something like that.
check if it's listed in /sys/block
then use my command, it will show you what udev does to that node.
Offline
I have no idea what I'm looking at in
/sys/block/sr0
Nothing there that sounds like a node or a device node. My rc.local should do the trick for me for now, though.
Offline
i mean is there /sys/block/sr0?
if yes run udevtest /block/sr0
then you get all invfo from udev what it does to the node.
Offline
Okay. Here goes:
[ralvy@tux ~]$ udevtest /block/sr0
main: looking at device '/block/sr0' from subsystem 'block'
udev_make_node: mknod(/dev/.tmp-11-0, 060600, 11, 0) failed: Permission denied
run_program: '/sbin/cdrom_id --export /dev/.tmp-11-0'
run_program: '/sbin/cdrom_id' returned with status 1
udev_rules_get_name: rule applied, 'sr0' becomes 'scd0'
unlink_secure: chown(/dev/.tmp-11-0, 0, 0) failed: No such file or directory
unlink_secure: chmod(/dev/.tmp-11-0, 0000) failed: No such file or directory
create_node: creating device node '/dev/scd0', major = '11', minor = '0', mode = '0660', uid = '0', gid = '93'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: '/lib/udev/cdsymlinks.sh'
main: run: 'socket:/org/kernel/udev/monitor'
Offline
ok your device is scd and has correct permissions on optical, gid=93
Offline
ok your device is scd and has correct permissions on optical, gid=93
Hmmm...but when I run k3b, and ask it to burn a CD, and I don't have sg[0-3] set to gid=93, I'm told
cdrecord has no permissions to open the device
If I then set those devices to gid=93, k3b stops complaining and writes the image. So scd having gid=93 is never enough by itself.
Offline
then do the same for sg device run udevtest on it it will tell you more.
Offline
Well, that's what's odd. There's no sg device in /sys/block. I think this is beyond me. For now, using rc.local to reset sg[0-2] permissions to gid=93 works okay. Arch seems to set sg3 to gid=93 without my having to change it with rc.local.
Offline
Pages: 1