[mythtv] unprivileged user?
Matt Zimmerman
mdz at debian.org
Wed Aug 13 00:22:45 EDT 2003
On Tue, Aug 12, 2003 at 06:44:21PM -0700, Gregorio Gervasio, Jr. wrote:
> >>>>> 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.
In the experimental sync code, yes (I don't know why). Anyway, it ignores
any error return, so it continues happily on even if you enable that as
non-root.
> 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);
Hmm, maybe it should. I never came across this issue because I don't use
ext2 for my mythtv data. I believe the HOWTO also recommends that users
create the filesystem without any reserved space when dedicating a
filesystem to mythtv.
--
- mdz
More information about the mythtv-dev
mailing list