LinHES Forums
http://forum.linhes.org/

Frustrated with mythbackend.log owner change seems random...
http://forum.linhes.org/viewtopic.php?f=6&t=11479
Page 1 of 1

Author:  siasl [ Thu Sep 07, 2006 7:41 am ]
Post subject:  Frustrated with mythbackend.log owner change seems random...

I have two r5C7 boxes that show the same issue. My old R5A16 box did it also. After running fine for a while (usually more than a few days) I go to reboot. Sometimes mythbackend starts but gives this error and does not log to mythbackend.log:

Executing /etc/init.d/mythtv-backend start ..

[b]Starting MythTV server: mythbackendcannot open logfile /var/log/mythtv/mythbackend.log
cannot open logfile; using stdout/stderr[/b]

It seems to be either myth-backend or some other process under some condition changes the owner of mythbackend.log from mythtv:mythtv to root:mythtv which runs fine until a reboot then the error happens and logging to mythbackend.log stops. I have been liveing with the problem by
either deleting mythbackend.log or chowning the log file back to mythtv:mythtv before doing a reboot. I've checked the mythbackend init.d files and the rotatelog scripts and they are using USER=mythtv.
When I delete the mythbackend.log file and just start up the mythbackend process it creates the log file properly with mythtv:mythtv ownership.

I'm stumped as to what is changing the log file owner.


P.S. I have slimserver runing on one of the boxes and the same thing happens to it's slimserver.log file which is also in /var/log/mythtv

These were both pristine ground up installs of R5C7

It is a minor irritation but like "jock itch" i'd like to get rid of it.

Thanks

Author:  tjc [ Thu Sep 07, 2006 5:24 pm ]
Post subject: 

Do this:
Code:
root@black2:~# ls -ald /var/log/mythtv
drwxrwsr-x  2 mythtv mythtv 4096 Sep  7 06:25 /var/log/mythtv

If you don't see the 's' in the permissions indicating "set group id" you need to add it:
Code:
chmod g+s /var/log/mythtv

If the group ownership isn't mythtv it needs to be:
Code:
chown mythtv:mythtv /var/log/mythtv

Author:  siasl [ Thu Sep 07, 2006 9:05 pm ]
Post subject: 

Did not see any diff from yours :

mythtv@telly:/var/log/mythtv$ ls -ald /var/log/mythtv
drwxrwsr-x 2 mythtv mythtv 4096 Sep 7 08:15 /var/log/mythtv

Tried your code any way.


Thanks.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/