Unable to write to check_result_path

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
pratik.patel
Posts: 77
Joined: Wed Apr 19, 2017 10:51 am

Re: Unable to write to check_result_path

Post by pratik.patel »

Have a look at error logs when trying to download system profile :


/bin/mkdir: cannot create directory '/usr/local/nagiosxi/var/components/profile': Permission denied
[Tue May 16 10:08:09.949912 2017] [:error] [pid 19734] [client 10.0.2.208:52818] PHP Warning: unlink(/usr/local/nagiosxi/tmp/ccm_index.tmp): No such file or directory in /usr/local/nagiosxi/html/includes/components/profile/profile.php on line 299, referer: http://nagiosxi.xxxxxxx.com/nagiosxi/in ... rofile.php
[Tue May 16 10:08:09.958226 2017] [:error] [pid 19734] [client 10.0.2.208:52818] PHP Warning: file_put_contents(/usr/local/nagiosxi/var/components/profile/profile.txt): failed to open stream: No such file or directory in /usr/local/nagiosxi/html/includes/components/profile/profile.php on line 315, referer: http://nagiosxi.xxxxxxx.com/nagiosxi/in ... rofile.php
sudo: unable to open audit system: Permission denied



On my Linux machine:
[root@xxxxxxxxxx components]# ls -dZ /usr/local/nagiosxi/var/components
drwsrwsr-x. apache nagios unconfined_u:object_r:usr_t:s0 /usr/local/nagiosxi/var/components
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Unable to write to check_result_path

Post by scottwilkerson »

pratik.patel wrote:Have a look at error logs when trying to download system profile :
Can you try this with SELinux not enforcing.

As was pointed out earlier
We do not support SELinux in enforcing, but if you have an SELinux expert in your organization, they may be able to get it working.
https://support.nagios.com/kb/article/n ... rface.html
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
pratik.patel
Posts: 77
Joined: Wed Apr 19, 2017 10:51 am

Re: Unable to write to check_result_path

Post by pratik.patel »

ok..
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Unable to write to check_result_path

Post by dwhitfield »

Does it work when SELinux is not in enforcing? If so, are we ready to lock the thread?
pratik.patel
Posts: 77
Joined: Wed Apr 19, 2017 10:51 am

Re: Unable to write to check_result_path

Post by pratik.patel »

Yes it works fine when selinux is permissive/disabled.
Locked