[mythtv-users] MythFrontend only runs as root

David Brieck Jr. myth at brieck.com
Tue Dec 23 13:09:00 EST 2003


I've attached my mythbackend startup script, it looks like it's starting
up with the user mythtv, however I am using the user myth. Also, below
are the permissions on /dev/video*:

[myth at localhost dev]$ ls -al video*
lr-xr-xr-x    1 root     root           10 Dec 23 12:37 video ->
v4l/video0
lr-xr-xr-x    1 root     root           10 Dec 23 12:37 video0 ->
v4l/video0
lr-xr-xr-x    1 root     root           10 Dec 23 12:37 video1 ->
v4l/video1
lr-xr-xr-x    1 root     root           11 Dec 23 12:37 video32 ->
v4l/video32
lr-xr-xr-x    1 root     root           11 Dec 23 12:37 video33 ->
v4l/video33

It looks like any user should be able to access the video devices. You
think it would be the mythbackend startup user then? I'm checking this
all from work, so I can't check to see if any changes made a difference
right now, but I will when I get home.

> -----Original Message-----
> From: mythtv-users-bounces at mythtv.org 
> [mailto:mythtv-users-bounces at mythtv.org] On Behalf Of Curtis Wood
> Sent: Tuesday, December 23, 2003 12:36 PM
> To: Discussion about mythtv
> Subject: RE: [mythtv-users] MythFrontend only runs as root
> 
> 
>    If the backend was fired up under a user other than root, 
> this would
> be a problem - I dont think the frontend actually talks to the video
> devices, instead the backend.
> 
> 
> On Tue, 2003-12-23 at 09:58, Jelle Kalf wrote:
> > Check your permissions on /dev/video* 
> > 
> > Check if you're a member of the group that belongs to these 
> devices. If not
> > either change the grouppermisions on the /dev/video* to 
> your users' group
> > you're planning to use or change the user to that specific group.
> > 
> > 
> > Jelle.
> > 
> > > -----Original Message-----
> > > From: mythtv-users-bounces at mythtv.org 
> > > [mailto:mythtv-users-bounces at mythtv.org] On Behalf Of 
> David Brieck Jr.
> > > Sent: dinsdag 23 december 2003 16:52
> > > To: mythtv-users at mythtv.org
> > > Subject: [mythtv-users] MythFrontend only runs as root
> > > 
> > > I'm finishing up my Myth setup and one of the things I 
> > > haven't been able to get working is the frontend running 
> > > under a user other than root. I'm running Mandrake 9.2 with 
> > > thacs rpms. I have dual PVR-250s if that matters. Ivtv is 
> > > running just fine, and I'm able to watch Live TV, but only 
> > > when the frontend is run under root. 
> > > 
> > > Can someone give me an idea of where the permissions might be 
> > > wrong? I don't want to run the frontend as root so please 
> > > don't tell me it's ok as root. If you need additional 
> > > information about my setup I'll respond ASAP.
> > > 
> > > 
> > 
> > 
> > 
> ______________________________________________________________________
> > 
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users at mythtv.org
> > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> 
> 
-------------- next part --------------
#!/bin/bash
#
# Startup script for mythbackend
#
# chkconfig: - 86 14
# description: mythbackend.
# processname: mythbackend
# pidfile: /var/run/mythbackend.pid
# config:

# Source function library.
. /etc/rc.d/init.d/functions

if [ -f /etc/sysconfig/mythbackend ]; then
        . /etc/sysconfig/mythbackend
fi

## Defaults, override them in /etc/sysconfig/mythbackend
: ${MYTHTV_HOME=/var/lib/mythtv}

binary=/usr/bin/mythbackend
prog=mythbackend
RETVAL=0
OPTIONS="$OPTIONS -d --logfile /var/log/mythtv/$prog.log --pidfile
/var/run/$prog.pid"

start() {
  gprintf "Starting %s: " "$prog"
  touch /var/run/mythbackend.pid; chown mythtv:mythtv /var/run/mythbackend.pid
  # Does not work on Red Hat, do to to missing audio/video groups.
#  cd $MYTHTV_HOME && daemon --user mythtv $binary $OPTIONS
  cd $MYTHTV_HOME && daemon $binary $OPTIONS
  RETVAL=$?
  echo
  [ $RETVAL = 0 ] && touch /var/lock/subsys/$prog
  return $RETVAL
}

stop() {
  gprintf "Stopping %s: " "$prog"
  killproc $binary
  RETVAL=$?
  echo
  [ $RETVAL = 0 ] && rm -f /var/lock/subsys/$prog /var/run/$prog.pid
}

# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        stop
        start
        ;;
  status)
        status $prog
        ;;
  *)
        gprintf "Usage: %s {start|stop|status|restart}\n" "$prog"
        exit 1
esac

exit $RETVAL


More information about the mythtv-users mailing list