LinHES Forums http://forum.linhes.org/ |
|
mythbackend.log: permission denied http://forum.linhes.org/viewtopic.php?f=6&t=3122 |
Page 1 of 2 |
Author: | siasl [ Sun Dec 26, 2004 11:07 am ] |
Post subject: | mythbackend.log: permission denied |
I've searched the forums and have not been able to find this issue. For some reason I have to do a chmod 777 mythbackend.log to get the backend to start. Otherwise it give me a permission error. After doing the chmod 777 it will work until some arbitrary time in the future (usually until I reboot). Not sure what is going on here. Logs do not point to anything unusual. |
Author: | jbman [ Mon Dec 27, 2004 3:28 am ] |
Post subject: | |
i have extactly the same problem. i find i have to do it every couple of weeks or so. i think its when i logrotate is done |
Author: | siasl [ Wed Jan 12, 2005 7:04 am ] |
Post subject: | mythbackend.log: permission denied |
I think you are right. My mythbakend.log is allways a new empty file. I also find I can get backend to start if I remove the empty mythbackend.log and restart backend. What script makes the new log file when they rotate? |
Author: | tjc [ Wed Jan 12, 2005 9:26 pm ] |
Post subject: | |
Why do inexperienced Unix users always seem to gravitate to the horrible chmod 777 superstition? I've got an ongoing problem with the DBAs and a few other people at work doing this. Even people who should know better... ![]() 1) You should always use the symbolic arguments for chmod rather than the octal numbers. Then you can actually remember the right thing to do rather than blindly doing the 777 lemming thing. 2) You do NOT need 777 (Read, Write, and eXecute for User, Group, and Other - aka chmod ugo+rwx). You *might* need 666 (aka chmod ugo=rw) but that ignores the REAL source of your problem. 3) The real source of your problem is that your /var/log/mythtv directory and the files in it have the wrong ownership and/or permissions. To fix it please logon as root and do the following steps: Code: chown mythtv:mythtv /var/log/mythtv /var/log/mythtv/*
chmod u=rwx,g=rwxs,o=rx /var/log/mythtv chmod u=rw,go=r /var/log/mythtv/* This will solve your problem once and for all and keep you from perpetrating the horror that is chmod 777. BTW - Cesman there seems to be something really screwy wrong with directory and file permssions in a lot of R4V5 installs. I don't know if this is an artifact of a corrupted ISO image, or something they're doing during the install, or ... but there is definitely a pattern. |
Author: | cesman [ Fri Jan 14, 2005 8:44 pm ] |
Post subject: | |
Yes, I know... That is probably because I did it on the road and not at my dev box. MythTV 0.16 was about to be released and I was on a business trip. At thing point, I'd rather work on R5 than R4V6. That is not to state that they won't be an R4V6 before R5.... |
Author: | siasl [ Fri Mar 04, 2005 4:59 pm ] |
Post subject: | Still having issues with mythbackend.log |
Have followed all the helpful suggestions on this thread to set permissions. Still have issue with backend not starting sometimes on reboot because of permissions. When it fails and /var/log/mythtv is checked : -rw-r--r-- 1 mythtv adm 0 Mar 4 16:44 mythbackend.log -rw-r----- 1 root adm 74488 Mar 4 15:14 mythbackend.log.0 -rw-r----- 1 root adm 1746 Feb 20 21:51 mythbackend.log.1.gz -rw-r--r-- 1 mythtv mythtv 2564 Feb 27 06:25 mythbackend.log.2.gz -rw-r--r-- 1 mythtv mythtv 1255 Feb 26 06:25 mythbackend.log.3.gz -rw-r--r-- 1 mythtv mythtv 633 Feb 24 06:25 mythbackend.log.4.gz -rw-r--r-- 1 mythtv mythtv 610 Feb 23 06:25 mythbackend.log.5.gz -rw-r--r-- 1 mythtv mythtv 1095 Feb 22 06:25 mythbackend.log.6.gz -rw-r--r-- 1 mythtv mythtv 524 Feb 21 06:25 mythbackend.log.7.gz Seems like something is creating the mythbackend.log with permissions for "adm" . when I delete the 0 size mythbackend.log then restart the backend successfully: -rw-r--r-- 1 mythtv mythtv 492 Mar 4 16:44 mythbackend.log -rw-r----- 1 root adm 74488 Mar 4 15:14 mythbackend.log.0 -rw-r----- 1 root adm 1746 Feb 20 21:51 mythbackend.log.1.gz -rw-r--r-- 1 mythtv mythtv 2564 Feb 27 06:25 mythbackend.log.2.gz -rw-r--r-- 1 mythtv mythtv 1255 Feb 26 06:25 mythbackend.log.3.gz -rw-r--r-- 1 mythtv mythtv 633 Feb 24 06:25 mythbackend.log.4.gz -rw-r--r-- 1 mythtv mythtv 610 Feb 23 06:25 mythbackend.log.5.gz -rw-r--r-- 1 mythtv mythtv 1095 Feb 22 06:25 mythbackend.log.6.gz -rw-r--r-- 1 mythtv mythtv 524 Feb 21 06:25 mythbackend.log.7.gz This is what is shown. Seems like some process somewhere is initializing the log file for "adm" but the backend is running under "mythtv". Kind of a minor annoyance. |
Author: | Xsecrets [ Fri Mar 04, 2005 6:14 pm ] |
Post subject: | |
I'm curious as to why only a few people experience this. I've run almost every alpha and never had the problem. |
Author: | tjc [ Fri Mar 04, 2005 7:29 pm ] |
Post subject: | |
I think that somewhere along the way the UIDs or GIDs Cecil used for the image got changed somehow and when upgrading from older versions you end up with a mismatched set. At a guess this happened between R4V4 and R4V5. I definitely noticed some issues with this going from R4V4 + 0.16 debs to R5A12... |
Author: | bshroyer [ Fri Mar 04, 2005 10:08 pm ] |
Post subject: | |
I upgraded from R4V2 to 0.16 debs to R5A10, and I had a TON of uid/gid problems. A bunch of directories had "cron" as owner, and a bunch more had some numeric userid as owner (everything in /myth/tv, e.g.) It wasn't a big deal to correct, once I figured out what was going on. |
Author: | tjc [ Fri Mar 04, 2005 11:34 pm ] |
Post subject: | |
Yeah, most likely the problem arises from restoring the /etc/passwd and /etc/group from the backup. I have an idea on how to verify that, but I'm fighting other battles at the moment. |
Author: | cesman [ Sat Mar 05, 2005 12:06 am ] |
Post subject: | |
The only thing under /etc that is restored is /etc/mythtv |
Author: | tjc [ Sat Mar 05, 2005 12:54 am ] |
Post subject: | |
Well, that kind of shoots that theory all to pieces doesn't it... ![]() |
Author: | cesman [ Sat Mar 05, 2005 1:21 am ] |
Post subject: | |
The reason the different uid/gid from R4 to R5 is because R5 is constructed from scratch. The users and groups were added in a different order than R4 (Knoppix). |
Author: | siasl [ Sat Mar 05, 2005 5:26 am ] |
Post subject: | Hate to burst bubble |
I'm new to the whole MythTV KnoppMyth scene. My install is a pristine KnoppMyth Install V4R5. I did not come from a privious install........ Seems to be related to whatever is going on to initialize a new mythbackend.log file. Whenever that is required (Boot time, aging of log files). |
Author: | tjc [ Sat Mar 05, 2005 10:33 am ] |
Post subject: | |
Well then the older posts above should answer the question. - make sure that mythtv has write permissons on the directory, either by ownership or group. - make sure that mythtv owns the file and has write permissions Mine looks like this: Code: root@black:/myth/mythburn# ls -al /var/log/mythtv/ total 84 drwxrwsr-x 2 mythtv mythtv 4096 Mar 5 06:25 . drwxr-xr-x 13 root root 4096 Mar 5 06:26 .. -rw-r--r-- 1 mythtv mythtv 293 Mar 5 06:25 mythbackend.log -rw-r--r-- 1 mythtv mythtv 5334 Mar 5 06:25 mythbackend.log.1 -rw-r--r-- 1 mythtv mythtv 7558 Mar 4 06:25 mythbackend.log.2 -rw-r--r-- 1 mythtv mythtv 3251 Mar 3 06:25 mythbackend.log.3 -rw-r--r-- 1 mythtv mythtv 16187 Mar 2 06:25 mythbackend.log.4 -rw-r--r-- 1 mythtv mythtv 34357 Mar 1 06:25 mythbackend.log.5 To enforce this, as root run the following commands: Code: mkdir -p /var/log/mythtv/
chown mythtv:mythtv /var/log/mythtv/ /var/log/mythtv/* chmod ug+rwx,g+s,o=rx /var/log/mythtv/ chmod u=rw,go=r /var/log/mythtv/* If you're a Unix newbie and are curious about what those do, try using the man (manual page) command to get the scoop. e.g. - man mkdir |
Page 1 of 2 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |