We are not able to recreate this issue in house. When SELinux is in permissive mode, the permissions on the .xml file are set to 644. We tested this in CentOS/RHEL 6 & 7.The way I see it this is a bug, not a feature request or enhancement. I know Nagios XI is not officially supported running under SELinux, but even in permissive mode, the .xml file is created with the ownersjip of root:root and permissions 640, which is too restrictive for the system to work with.
Code: Select all
[root@TEST_XI_CentOS_6 ~]# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: permissive
Policy version: 24
Policy from config file: targeted
[root@TEST_XI_CentOS_6 ~]# ll /usr/local/nagiosxi/html/includes/components/autodiscovery/jobs/
total 176
-rw-r--r--. 1 apache apache 134419 Apr 7 10:53 32Rhe7.out
-rw-r--r--. 1 apache apache 0 Apr 7 10:51 32Rhe7.watch
-rw-r--r--. 1 root root 44264 Apr 7 10:53 32Rhe7.xml
[root@TEST_XI_RHEL_6 ~]# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: permissive
Policy version: 24
Policy from config file: targeted
[root@TEST_XI_RHEL_6 ~]# ll /usr/local/nagiosxi/html/includes/components/autodiscovery/jobs/
total 12
-rw-r--r--. 1 apache apache 4160 Apr 7 11:04 YRQ9PE.out
-rw-r--r--. 1 apache apache 0 Apr 7 11:04 YRQ9PE.watch
-rw-r--r--. 1 root root 1241 Apr 7 11:04 YRQ9PE.xml
[root@TEST_XI_CentOS_7 ~]# sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: permissive
Mode from config file: permissive
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 28
[root@TEST_XI_CentOS_7 ~]# ll /usr/local/nagiosxi/html/includes/components/autodiscovery/jobs/
total 176
-rw-r--r--. 1 apache apache 132952 Apr 7 11:04 jjDYIc.out
-rw-r--r--. 1 apache apache 0 Apr 7 10:58 jjDYIc.watch
-rw-r--r--. 1 root root 42474 Apr 7 11:04 jjDYIc.xml
[root@TEST_XI_RHEL_7 ~]# sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: permissive
Mode from config file: permissive
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 28
[root@TEST_XI_RHEL_7 ~]# ll /usr/local/nagiosxi/html/includes/components/autodiscovery/jobs/
total 12
-rw-r--r--. 1 apache apache 5413 Apr 7 11:06 3pcrIk.out
-rw-r--r--. 1 apache apache 0 Apr 7 11:06 3pcrIk.watch
-rw-r--r--. 1 root root 1728 Apr 7 11:06 3pcrIk.xml
Having said that, I will try to lab this one more time on Nagios XI 5.2.9 (I tested this on latest).
You said you were using the Auto-discovery wizard 1.4.0. What is the version of the "Auto-Discovery" component that you are currently using (Admin->Manage Components)?