LinHES Forums http://forum.linhes.org/ |
|
mythbackend won't run--can't read mysql.txt http://forum.linhes.org/viewtopic.php?f=6&t=4802 |
Page 1 of 1 |
Author: | knathraak [ Sat Jun 04, 2005 5:04 pm ] |
Post subject: | mythbackend won't run--can't read mysql.txt |
Thursday night I reverted back to r5a12 after an upgrade didn't go smoothly. Since then it's been working fine. Just now I powered off the machine (possibly first time since thurs night) to swap cdrom drives. Now mythbackend won't start from the init script. If I run: Code: $ mythbackend & it works fine. But starting it from the init script: Code: # /etc/init.d/mythbackend start
causes the backend not to run. log entries complain about not being able to read mysql.txt and not being able to create ~/.mythtv. I restore my home directory, preseving permissions so everything should be fine there. just to be sure I checked the permissions and both ~/.mythv/ and mysql.txt are owned by mythtv:mythtv and are world readable. Any suggestions? Thanks |
Author: | Xsecrets [ Sat Jun 04, 2005 6:27 pm ] |
Post subject: | |
did you happen to create a user called mythtv for the regular user? the instructions specifically tell you not to do this. |
Author: | knathraak [ Sat Jun 04, 2005 10:26 pm ] |
Post subject: | |
Xsecrets wrote: did you happen to create a user called mythtv for the regular user? the instructions specifically tell you not to do this.
Actually, I didn't. I noticed some others were having similar problems due to that. When I first set up myth on Ubuntu, i learned the hard way. Not so with knoppmyth. I let it do all the magic. passwd: Code: mythtv@myth:~$ grep mythtv /etc/passwd
mythtv:$1$GLU854Ty$NGBuJMMLs4jXBFBVAox9U/:105:105::/home/mythtv:/bin/bash mythtv@myth:~$ grep mythtv /etc/group cdrom:*:24:mythtv,myth audio:!:29:mythtv,myth video:!:44:mythtv,myth mythtv:x:105: mythtv@myth:~$ (yes I know i posted the password hash for mythtv. really, don't bother running john against it.) anything else to check for? |
Author: | tjc [ Sun Jun 05, 2005 1:59 pm ] |
Post subject: | |
Are you remembering to run it with a "su - mythtv ..." wrapper so it doesn't try running as root? |
Author: | Xsecrets [ Sun Jun 05, 2005 2:36 pm ] |
Post subject: | |
well when running it from init.d it shouldn't require the su mythtv, though I suppose it's possible he ran it for the first time as root, and it created some file that subsiquently are not editable by mythtv when it gets run from init.d |
Author: | Iceman [ Wed Jun 08, 2005 5:07 pm ] |
Post subject: | |
I had the same problem sometime ago... It's simple, just put this line in the mythbackend init.d script (in the top): HOME=/home/mythtv In this way, it found .mythtv/mysql.txt it search... |
Author: | knathraak [ Thu Jun 09, 2005 11:05 am ] |
Post subject: | |
Thanks for the tips. Quote: Are you remembering to run it with a "su - mythtv ..." wrapper so it doesn't try running as root? When I run the init script from init.d, i run it as root, but the init script transitions to the mythtv user before running mythtbackend. Quote: I had the same problem sometime ago...
It's simple, just put this line in the mythbackend init.d script (in the top): HOME=/home/mythtv In this way, it found .mythtv/mysql.txt it search... I'll give this a try. wonder why $HOME isn't already defined? Strange that before I reinstalled, I didn't have to do this. Thanks again, and I'll give this a try. |
Author: | knathraak [ Thu Jun 09, 2005 12:16 pm ] |
Post subject: | |
I've been experimenting. When I used sudo to start the myth-backend init script, it runs fine. This is because using sudo the script is run within your own shell but with su priviledges, so it get $HOME from your environment. However when the script is run by init (as root) at bootup or when I su then run it, $HOME = /root, so clearly it can't read $HOME/.mythtv/mysql.txt. Here's what I don't get. The start-stop-daemon program that starts the mythbackend changes to the mythtv user when running /usr/bin/mythbackend. How is it supposed to get $HOME from the mythtv user's environment, and why isn't it? One other thing I can think of that may be related is ownerships of any of the files under /etc. When I restored my /etc/ directory, I screwed up preserving some of the ownerships, so to fix things I chowned root:root everything under etc. Was I wrong in doing this? Does any one know of anything that should be owned by some other user? To check run the following command: Code: find /etc -gid +0 -or -uid +0
which finds anything under /etc that is owned by a user or group other than root. I appreciate any input or suggestions on this. Thanks |
Author: | knathraak [ Thu Jun 09, 2005 7:01 pm ] |
Post subject: | |
Okay sorry to keep replying to my own post.. but I gave r5a16 another try tonight...with success, so the problem is now moot. However any insights to what may have been causing this would still be appreciated. Very perplexing, indeed. |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |