[mythtv] unprivileged user?

Gregorio Gervasio, Jr. gtgj at pacbell.net
Tue Aug 12 19:44:21 EDT 2003

>>>>> Matt Zimmerman writes:

m> There is no reason whatsoever to run any part of mythtv as root in the first
m> place (the debs don't), so I don't think it's necessary to have myth itself
m> try to switch to another user.  Just start it as the user that you want to
m> run it as.

        I think there's code in NuppelVideo* that tries to renice to a
high priority so that will only work if it's running as root.  I
haven't noticed if that really makes a difference though.

        Slightly related -- shouldn't disk free space be calculated
using f_bavail rather than f_bfree since mythbackend doesn't have to
run as root?  It'll make a difference for people who forgot to change
from the 5% default reserved space on their giant partitions.  It
should head off some questions ("Why did my disk fill up even with
auto-expire?  Why does MythTV think there is more space than is
reported by df?").

./programs/mythbackend/encoderlink.cpp:175:            freeSpace = statbuf.f_bfree / (1024*1024/statbuf.f_bsize);
./programs/mythbackend/encoderlink.cpp:194:                freeSpace = statbuf.f_bfree / (1024*1024/statbuf.f_bsize);
./programs/mythbackend/mainserver.cpp:897:        usedspace = (statbuf.f_blocks - statbuf.f_bfree) / 
./programs/mythbackend/autoexpire.cpp:60:            freespace = statbuf.f_bfree / (1024*1024*1024/statbuf.f_bsize);
./programs/mythbackend/autoexpire.cpp:98:                        statbuf.f_bfree / (1024*1024*1024/statbuf.f_bsize);

Gregorio Gervasio, Jr.

More information about the mythtv-dev mailing list