permissions on dvb card
Hi there
i am trying to get my DVB cards setup under FC5 i have them seen and they are working, now i just need to get the permissions set correct on the device. right now root owns the device under /dev/dvb as shown by drwxr-xr-x 4 root root 80 Apr 7 20:07 dvb how do i go about chanigng this so that my normal user (mythtv) can access this, if i change group any one could access that was a member of that group right? say group called video i dove into udev file 50-udev.rules i have changed the line Quote:
Quote:
drwxr-xr-x 4 root root 80 Apr 7 20:07 dvb what else can i change or have done wrong? any help would be grate many thanks Rob |
Same here.
Hi kudos, have you fixed this yet?
This is driving me nuts. How much more arcane linux black magic do I have to grok before I can use mythtv? Anyway, like you, I tried merely inserting GROUP="mythtv" but the devices under /dev/dvb/adapter0 were all still crw------- I figured that the existing code was not actually selecting under adapter0, so I tried # DVB KERNEL=="dvb/*", GROUP="mythtv", MODE="0660" KERNEL=="dvb/adapter*", GROUP="mythtv", MODE="0660" KERNEL=="dvb/adapter*/*", GROUP="mythtv", MODE="0660" KERNEL=="dvb/adapter0/*", GROUP="mythtv", MODE="0660" KERNEL=="dvb", GROUP="mythtv",MODE="0660" SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \ NAME="%c",GROUP="mythtv", MODE="0660" but that did not work either. I'm going to try putting the GROUP code after the PROGRAM code, but I am not optimistic. Is there any way to know what the final value of PROGRAM is? Maybe that is the place to insert logic to change permissions. |
Y.m.b.m.
Exactly as I feared, yes, I had to learn Yet More Black Magic.
All the docs on udev, including the web tutorial, the man pages and the release notes etc. in /usr/share/doc/udev-084/ are not applicable. The problem is that FC5 makes all the group and permission entries in udev/rules.d useless, because after every match is done, it runs pam_console_apply on the newly created devices. pam_console_apply explicitly sets the permissions on each device as defined by the files "/etc/security/console.perms" and everything in "/etc/security/console.perms.d/*" Low numbered (lexically sorted) files have precedence. SO, a fix is to create a file "/etc/security/console.perms.d/10-local.perms" And insert the following lines: #This text tells pam_console_apply to #make the the /dev/dvb device, and all #its subsystems, to be owned by #user root, and group mythtv. User and #group have read-write access, and others # have no access. # device classes -- these are shell-style globs <dvb>=/dev/dvb* \ /dev/dvb/* \ /dev/dvb/adapter*/* # permission definitions <console> 0660 <dvb> 0660 root.mythtv <xconsole> 0660 <dvb> 0660 root.mythtv You can replace “mythtv” above with the group that you want. I found that I also needed the <xconsole> login expression. This is a configuration bug apparently only in FC5. Oh, for future readers, here is how to test udev rules for mythtv devices. It's all the stuff under /sys/class/dvb/*, WITHOUT the "/sys". Try udevtest /class/dvb/dvb0.demux0 udevtest /class/dvb/dvb0.dvr0 udevtest /class/dvb/dvb0.frontend0 udevtest /class/dvb/dvb0.net0 where the "0" suffix is whatever you actully find in /sys/class/dvb/dvb* Good luck! |
I was suffering exactly the same issue with FC6 (ahead of getting MythTV to work). I couldn't get your 10-local.perms solution to work myself.
In the end, I resorted to editing the /etc/security/console.perms.d/50-default.perms file and changing the entry containing "<dvb>" to the value I required. i.e.: <console> 0600 <dvb> 0660 root.mythtv That appears to have worked. However, I have to give thanks to you because there's no way I would have found the location of the appropriate files. I too had been pulling my hair out wondering why the udev docs were getting me nowhere! |
permissions on udev devices in general
Quote:
...sheesh. Got to love those subsystem interactions. No wonder that linux has not become an OS for the masses. --Eric |
All times are GMT -5. The time now is 12:26 AM. |