chown: cannot access `/usr/local/nagios/etc/*.cfg': No such

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Nags007
Posts: 58
Joined: Wed Mar 08, 2017 12:32 pm

chown: cannot access `/usr/local/nagios/etc/*.cfg': No such

Post by Nags007 »

Hi Team,

I am trying to install NagiosXI 5.4.3 - New version on RHEL 6.8.

[root@nagiosxi]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.8 (Santiago)

There is no nagios folder ins /usr/local


[root@local]# ll
total 96
drwxr-xr-x. 2 root root 4096 Dec 1 2011 bin
drwxr-xr-x. 2 root root 4096 Jun 28 2011 etc
drwxr-xr-x. 2 root root 4096 Jun 28 2011 games
drwxr-xr-x 4 root root 4096 Aug 21 2012 ibm
drwxr-xr-x. 2 root root 4096 Jun 28 2011 include
drwxr-xr-x. 3 root root 4096 Dec 1 2011 lib
drwxr-xr-x. 3 root root 4096 Mar 10 17:25 lib64
drwxr-xr-x. 2 root root 4096 Jun 28 2011 libexec
drwx------. 2 root root 16384 Jan 20 2012 lost+found
drwxr-xr-x 6 root root 4096 Mar 17 11:12 nagiosmobile
drwxr-xr-x 10 nagios nagios 4096 Mar 17 12:31 nagiosxi
drwxr-xr-x 5 apache apache 4096 Mar 14 13:59 nagvis
drwxr-xr-x 7 nagios nagios 4096 Mar 14 13:59 nrdp
drwxr-xr-x 4 root root 4096 Mar 14 14:00 nsis
drwxr-x--- 3 root root 4096 Mar 8 20:02 rrdtool-1.3.1
drwxr-xr-x. 2 root root 4096 Jun 28 2011 sbin
drwxr-xr-x. 6 root root 4096 Mar 10 17:25 share
drwxr-xr-x. 2 root root 4096 Jun 28 2011 src
drwxr-x--- 2 root root 4096 Aug 21 2012 support

when i verify the B-installxi file script, below chown statement is there.
=============================================================

# Fix permissions on config files
chown -R "$apacheuser:$nagiosgroup" /usr/local/nagios/etc/*.cfg

but on the system folder structure , only /usr/local is there, and no nagios directory.

cat /etc/passwd
=============================================
nagios:x:597:597::/local_home/nagios:/bin/bash
mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash
postgres:x:26:26:PostgreSQL Server:/var/lib/pgsql:/bin/bash
ajaxterm:x:497:494:Ajaxterm user:/usr/share/ajaxterm:/sbin/nologin
exim:x:93:93::/var/spool/exim:/sbin/nologin
=========================================================

[root@nagiosxi]# ps aux | grep mysqld
root 24249 0.0 0.0 103320 836 pts/0 S+ 19:10 0:00 grep mysqld

[root@nagiosxi]# ps aux | grep nagios
root 24252 0.0 0.0 103320 836 pts/0 S+ 19:11 0:00 grep nagios

[root@nagiosxi]# ps aux | grep nagiosxi
root 24254 0.0 0.0 103320 844 pts/0 S+ 19:11 0:00 grep nagiosxi
===================================================================================


[root@ nagiosxi]# find / -iname *.cfg
===========================================
/tmp/nagiosxi5.4.3/nagiosxi/nagiosxi/basedir/var/xi-sys.cfg
/tmp/nagiosxi5.4.3/nagiosxi/xi-sys.cfg

/apps/nagiosxi/xi-sys.cfg
/apps/nagiosxi/nagiosxi/basedir/var/xi-sys.cfg

/usr/local/nagiosxi/var/xi-sys.cfg
===================================================

Please let me know, how to proceed further..

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

Re: chown: cannot access `/usr/local/nagios/etc/*.cfg': No s

Post by dwhitfield »

Is this a fresh install or an upgrade? Can you send the corresponding log file? I am assuming it is an upgrade since you have a nagios process. Are you running the fullinstall script or the upgrade script?

What happens if you mkdir nagios in /usr/nagios?

What is the output of the following

Code: Select all

sestatus
ll /tmp
Nags007
Posts: 58
Joined: Wed Mar 08, 2017 12:32 pm

Re: chown: cannot access `/usr/local/nagios/etc/*.cfg': No s

Post by Nags007 »

Hi Team,
I have installed NagiosXI 5.4.3 ( latest version March 16th , 5.4.3 ). Its working fine.

Please close this.

Thanks,
Nag.
Locked