Solved it myself. Think it was an SELINUX problem. When I created the .cfg file under my id, having su'ed to root, I got the problem. When I deleted and recreated the .cfg file having logged in as root directly, the problem went away.
Wrolf From: mrtg [mailto:[email protected]] On Behalf Of Courtney, Wrolf Sent: Wednesday, September 24, 2014 9:34 AM To: [email protected] Subject: [mrtg] Permission denied at /usr/bin/../lib64/mrtg2/MRTG_lib.pm line 1580 I get the following error on one of my MRTG config files when I run it from a cron job. I do not get the error when I run it from the command line. I have plenty of other config files run from the same cron job that run just fine. ERROR: writing /etc/mrtg/00255520WLC1.ok.ok: Permission denied at /usr/bin/../lib64/mrtg2/MRTG_lib.pm line 1580. Anyone seen this before? Wrolf Courtney Contents of /etc/cron.d/mrtg LANG=C 0-59/5 * * * * root bash -c "ls /etc/mrtg/*.cfg | xargs -l /usr/bin/mrtg" Contents of /etc/mrtg/00255520WLC1.cfg (showing first interface only) # Created by # /usr/bin/cfgmaker --ifref=name --ifdesc=descr --output=/etc/mrtg/00255520WLC1. cfg --global "WorkDir: /var/www/mrtg/00255520WLC1" --global "Options[_]: growrig ht,bits" --snmp-options=:::::2 [email protected]<mailto:[email protected]> ### Global Config Options # for UNIX # WorkDir: /home/http/mrtg # or for NT # WorkDir: c:\mrtgdata ### Global Defaults # to get bits instead of bytes and graphs growing to the right # Options[_]: growright, bits EnableIPv6: no WorkDir: /var/www/mrtg/00255520WLC1 Options[_]: growright,bits ###################################################################### # System: 00255520WLC1-1 # Description: Ethernet Routing Switch 5520-48T-PWR HW:35 FW:6.0.0.6 SW :v6.0.3.008 BN:08 (c) Nortel Networks # Contact: NCSO - 646 252-5700 # Location: 331 Bay Street SIRR ###################################################################### ### Interface 1 >> Descr: 'Nortel-Ethernet-Routing-Switch-5520-48T-PWR-Module--- Port-1' | Name: 'ifc1 (Slot: 1 Port: 1)' | Ip: '' | Eth: '' ### Target[10.3.3.1_ifc1_(Slot_1_Port_1)]: #ifc1\ (Slot\:\ 1\ Port\:\ 1):public@ 10.3.3.1:::::2 SetEnv[10.3.3.1_ifc1_(Slot_1_Port_1)]: MRTG_INT_IP="" MRTG_INT_DESCR="Nortel- Ethernet-Routing-Switch-5520-48T-PWR-Module---Port-1" MaxBytes[10.3.3.1_ifc1_(Slot_1_Port_1)]: 1250000 Title[10.3.3.1_ifc1_(Slot_1_Port_1)]: Nortel Ethernet Routing Switch 5520-48T -PWR Module - Port 1 -- 00255520WLC1-1 PageTop[10.3.3.1_ifc1_(Slot_1_Port_1)]: <h1>Nortel Ethernet Routing Switch 55 20-48T-PWR Module - Port 1 -- 00255520WLC1-1</h1> <div id="sysdetails"> <table> <tr> <td>System:</td> <td>00255520WLC1-1 in 331 Bay Street SIR R</td> </tr> <tr> <td>Maintainer:</td> <td>NCSO - 646 252-5700</td> </tr> <tr> <td>Description:</td> <td>Nortel-Ethernet-Routing-Switch-5520- 48T-PWR-Module---Port-1 </td> </tr> <tr> <td>ifType:</td> <td>ethernetCsmacd (6)</td> </tr> <tr> <td>ifName:</td> <td>ifc1 (Slot: 1 Port: 1)</td> </tr> <tr> <td>Max Speed:</td> <td>10.0 Mbits/s</td> </tr> </table> </div>
_______________________________________________ mrtg mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
