Result of # ls -la /var/lib/mrtg
total 4
drwxrwxr-x 2 apache nagios 20 Dec 23 13:25 .
drwxr-xr-x. 42 root root 4096 Dec 4 08:05 ..
-rwxrwxr-x 1 apache nagios 0 Jan 5 10:45 mrtg.ok
I do not believe there are two mrtg cron jobs running. The errors I'm collecting are being logged to a file that I've listed in the cron job.
Result of # ls -l /etc/cron.d/
total 16
-rw-r--r-- 1 root root 128 Jun 9 2019 0hourly
-rw-r--r-- 1 root root 985 Dec 22 17:31 KoneaCheckerCrontab
-rw-r--r-- 1 root root 612 Jan 5 10:49 mrtg
-rw-r--r-- 1 root root 1806 Dec 17 10:49 nagiosxi
I've updated the cron job to put mrtg.ok into /tmp/. Since there are no timestamps in the log, I'll note that my log file last updated 1/5 at 1:00.
]# ls -la /usr/local/nagiosxi/var/mrtg.log
-rw-r--r-- 1 nagios nagios 303034 Jan 5 01:00 /usr/local/nagiosxi/var/mrtg.log
MRTG Permission Denied
Re: MRTG Permission Denied
Hi John,
Can you please run the below command and update the results:
Regards,
Vinh
Can you please run the below command and update the results:
Code: Select all
ls -aZ /var/lib/mrtg/
Vinh
Re: MRTG Permission Denied
# ls -aZ /var/lib/mrtg
drwxrwxr-x apache nagios ? .
drwxr-xr-x. root root system_u:object_r:var_lib_t:s0 ..
-rwxrwxr-x apache nagios ? mrtg.ok
drwxrwxr-x apache nagios ? .
drwxr-xr-x. root root system_u:object_r:var_lib_t:s0 ..
-rwxrwxr-x apache nagios ? mrtg.ok
Re: MRTG Permission Denied
Vinh,
We do not have SELinux enabled.
John
We do not have SELinux enabled.
John
Re: MRTG Permission Denied
Thanks .... now I understand that you do have SELinux turned on.
Re: MRTG Permission Denied
Moving the mrtg.ok and mrtg.lock files to /tmp/ looks to have resolved the permissions issue.
This topic can be closed. Thanks
This topic can be closed. Thanks
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: MRTG Permission Denied
Great!shoreypu wrote:Moving the mrtg.ok and mrtg.lock files to /tmp/ looks to have resolved the permissions issue.
This topic can be closed. Thanks
Locking thread