| Fedora This forum is for the discussion of the Fedora Project. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
04-07-2006, 02:39 PM
|
#1
|
|
Member
Registered: Oct 2002
Location: UK
Distribution: Fedora 4
Posts: 90
Rep:
|
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
|
|
|
|
11-04-2006, 10:38 AM
|
#2
|
|
Member
Registered: Jan 2005
Posts: 30
Rep:
|
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.
|
|
|
|
11-04-2006, 05:11 PM
|
#3
|
|
Member
Registered: Jan 2005
Posts: 30
Rep:
|
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!
|
|
|
|
11-05-2006, 10:47 AM
|
#4
|
|
LQ Newbie
Registered: Nov 2006
Distribution: Fedora Core
Posts: 1
Rep:
|
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!
|
|
|
|
12-09-2006, 10:10 PM
|
#5
|
|
LQ Newbie
Registered: Oct 2002
Location: Boston, MA
Posts: 3
Rep:
|
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
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:33 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|