Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

permission issues

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


gaberubin at gmail

Oct 4, 2009, 11:12 AM

Post #1 of 5 (1027 views)
Permalink
permission issues

Hi all,

I have been getting some weird permission issues lately. I don't
think I have made any changes to my system that would have caused
this, but maybe something got updated to do so.

Basically, when I restart, the mythtv user loses access to a lot of
hardware components (sound, serial port, and video).

I have to manually go in as root and do the following:
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)

Obviously, this is somewhat annoying, and somewhat baffling. How do I
make these changes stick permanently through a reboot? I don't care
if the mythtv user has access to the whole system; the box is behind a
firewall and I am not too concerned with security here. I just want
to fix the issue.

Thanks
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


knowledgejunkie at gmail

Oct 4, 2009, 11:27 AM

Post #2 of 5 (998 views)
Permalink
Re: permission issues [In reply to]

2009/10/4 Gabe Rubin <gaberubin [at] gmail>:
> Hi all,
>
> I have been getting some weird permission issues lately.  I don't
> think I have made any changes to my system that would have caused
> this, but maybe something got updated to do so.
>
> Basically, when I restart, the mythtv user loses access to a lot of
> hardware components (sound, serial port, and video).
>
> I have to manually go in as root and do the following:
> 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)
>
> Obviously, this is somewhat annoying, and somewhat baffling.  How do I
> make these changes stick permanently through a reboot?  I don't care
> if the mythtv user has access to the whole system; the box is behind a
> firewall and I am not too concerned with security here.  I just want
> to fix the issue.

Are you using Fedora?

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.

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.

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
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


gaberubin at gmail

Oct 5, 2009, 10:53 AM

Post #3 of 5 (973 views)
Permalink
Re: permission issues [In reply to]

On Sun, Oct 4, 2009 at 11:27 AM, Nick Morrott <knowledgejunkie [at] gmail> wrote:
>
> Are you using Fedora?
>

Yes. Fedora 10.

> 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)?

> 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.
> Cheers,
> Nick

Thanks for your help
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


knowledgejunkie at gmail

Oct 12, 2009, 11:36 PM

Post #4 of 5 (902 views)
Permalink
Re: permission issues [In reply to]

2009/10/5 Gabe Rubin <gaberubin [at] gmail>:
> On Sun, Oct 4, 2009 at 11:27 AM, Nick Morrott <knowledgejunkie [at] gmail> 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
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


gaberubin at gmail

Nov 26, 2009, 9:17 AM

Post #5 of 5 (764 views)
Permalink
Re: permission issues [In reply to]

Resurrecting an old thread where I had to manually change the
permissions for my tty, video, and audio devices in order to let the
mythtv user access them after each reboot (i.e., chmod ugo+rw
/dev/tty*, chmod ugo+rw /dev/video*, and chmod ugo+rw /dev/snd/*). I
did not want to learn how to o the udev rules and muck around with
that and just decided to add the mythtv user to the audio, video, and
tty groups (by doing: usermod -a -G tty mythtv, usermod -a -G video
mythtv, usermod -a -G audio mythtv).
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.