[mythtv-users] permission issues

Nick Morrott knowledgejunkie at gmail.com
Tue Oct 13 06:36:13 UTC 2009


2009/10/5 Gabe Rubin <gaberubin at gmail.com>:
> On Sun, Oct 4, 2009 at 11:27 AM, Nick Morrott <knowledgejunkie at gmail.com> wrote:
>>
>> Are you using Fedora?
>>
>
> Yes.  Fedora 10.

I've not had to do any of this on Fedora 11 (BE runs as root, FE as
regular user), as far as I remember. I've not looked into this for
some time so it might have changed on current releases, but...

>> You can use additional udev rules to alter user/group ownership of the
>> devices when they are created - see
>> http://www.reactivated.net/writing_udev_rules.html for more details.
>> You want your rules to be processed before the default OS rules, so
>> the rule file needs a name that is alphanumerically less than that of
>> the default rules file.
>
> I have done this for firewire, but fortunately the syntax was in the
> wiki.  Not sure about the syntax for these devices and it does not
> seem that straight forward.  Again, the devices I need permissions for
> (with a slight correction to a typo I had in the OP):
>
>>> chmod ugo+rw /dev/tty*  (so myth can change the channels over the serial port)
>>> chmod ugo+rw /dev/snd/* (so myth can output sound)
>>> chmod ugo+rw /dev/video* (so myth can capture with my PVR-350)
>
> How would I go about adding rules for these (and more to the point,
> why all of a sudden do I need to do this after not having to before)?

Not sure what might have changes (perhaps the default udev rules?).

On an old Fedora installation I used the rules:

KERNEL=="video*",               GROUP="htpc", MODE="0660", OPTIONS="last_rule"
KERNEL=="radio*",               GROUP="htpc", MODE="0660", OPTIONS="last_rule"
KERNEL=="winradio*",            GROUP="htpc", MODE="0660", OPTIONS="last_rule"
KERNEL=="vtx*",                 GROUP="htpc", MODE="0660", OPTIONS="last_rule"
KERNEL=="vbi*",                 GROUP="htpc", MODE="0660", OPTIONS="last_rule"
KERNEL=="video/*",              GROUP="htpc", MODE="0660", OPTIONS="last_rule"
KERNEL=="vttuner",              GROUP="htpc", MODE="0660", OPTIONS="last_rule"
KERNEL=="v4l/*",                GROUP="htpc", MODE="0660", OPTIONS="last_rule"

to control the group and access perms of the V4L devices when created.

>> You might also need to modify/add a permissions file (in
>> /etc/security/console.perms.d/ on Fedora) to update console
>> permisisons, depending upon your usage requirements.
>
> I looked into this as well, and again, was a bit confused.

On the old Fedora installation, I used the following in a perms file:

<sound>=/dev/dsp* /dev/audio* /dev/midi* \
        /dev/mixer* /dev/sequencer \
        /dev/sound/* /dev/beep \
        /dev/snd/*
<v4l>=/dev/video* /dev/radio* /dev/winradio* /dev/vtx* /dev/vbi* \
      /dev/video/*
<dvb>=/dev/dvb/adapter*/*
<lirc>=/dev/lirc[0-9]*

<console>  0600 <sound>      0660 root.htpc
<console>  0600 <v4l>        0660 root.htpc
<console>  0600 <dvb>        0660 root.htpc
<console>  0600 <lirc>       0660 root.htpc

This would give the console user rw access to the devices in the
defined classes.

An quick and dirty alternative to these steps would be to add the
chmod commands to your /etc/rc.local and have that execute them on
each boot.

Cheers,
Nick

-- 
Nick Morrott

MythTV Official wiki:
http://mythtv.org/wiki/
MythTV users list archive:
http://www.gossamer-threads.com/lists/mythtv/users

"An investment in knowledge always pays the best interest." - Benjamin Franklin


More information about the mythtv-users mailing list