LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 04-07-2006, 02:39 PM   #1
kudos
Member
 
Registered: Oct 2002
Location: UK
Distribution: Fedora 4
Posts: 90

Rep: Reputation: 15
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:
# DVB
KERNEL=="dvb", MODE="0666"
SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \
NAME="%c", MODE="0660"
to
Quote:
# DVB
KERNEL=="dvb", GROUP="video", MODE="0666"
SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \
NAME="%c", MODE="0660"
but i still get /dev/dvb shown as being own by root etc
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
 
Old 11-04-2006, 10:38 AM   #2
charlweed
Member
 
Registered: Jan 2005
Posts: 46

Rep: Reputation: 15
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.
 
Old 11-04-2006, 05:11 PM   #3
charlweed
Member
 
Registered: Jan 2005
Posts: 46

Rep: Reputation: 15
Angry 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!
 
Old 11-05-2006, 10:47 AM   #4
riskboy
LQ Newbie
 
Registered: Nov 2006
Distribution: Fedora Core
Posts: 1

Rep: Reputation: 0
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!
 
Old 12-09-2006, 10:10 PM   #5
ewest02
LQ Newbie
 
Registered: Oct 2002
Location: Boston, MA
Posts: 3

Rep: Reputation: 0
permissions on udev devices in general

Quote:
Originally Posted by riskboy
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!
Yes indeed! I too was facing much angst and hair loss. I could not get udev configured to create sound devices with group "audio". No way, no how. However once I modified the 50-default.perms file the devices were created with perms 0660 and group "audio". Hurray!

...sheesh. Got to love those subsystem interactions. No wonder that linux has not become an OS for the masses.

--Eric
 
  


Reply

Tags
permissions, udev


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Firmware question about AverTV DVB-T USB 2.0 dvb receiver phildacey Linux - Hardware 0 02-19-2006 03:57 PM
Kaffeine recognizes DVB cards, scans channels, but DVB icon remains dim. Ekkume Ubuntu 5 01-24-2006 10:45 AM
DVB card is not working kapa Linux - Hardware 2 11-13-2005 06:57 AM
Cannot detect Cinergy1200 DVB-C card Ankardo Linux - Hardware 0 06-27-2005 09:58 AM
how do you use a nova-t DVB card ? Snerkel Linux - Hardware 1 09-12-2004 04:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 09:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration