Page 2 of 2
Re: Nagios Core Startup Issue
Posted: Thu Mar 13, 2014 10:04 am
by sreinhardt
Directories likely will need X, actual config files should only need nagios user and group(at least one that nagios is a part of, not necessarily the nagios group) read access. Also make sure that all of those files and directories listed in nagios.cfg do exist even if they are empty. It would make sense if your verifications were done as root, that you didn't see this before, as nagios will drop permissions before verification.
Re: Nagios Core Startup Issue
Posted: Thu Mar 13, 2014 11:05 am
by xcomm
so just to test permission of nagios I chmod 777 -R the objects and private dir.
The script still failed on the same objects and private/resources.cfg
I dropped to the nagios user and ran nagios -v (nagios.cfg path), and the validation passes.
Is the script being run as the from the init.d NagiosUser=
I have it set to nagios currently.
-PS Thanks for all the help
Re: Nagios Core Startup Issue
Posted: Fri Mar 14, 2014 9:21 am
by slansing
What were you running it with before? Another random user, or root? I believe you should only be able to control the init script as root or nagios. If you can verify that it did not work as the root user then we might have another issue.
Re: Nagios Core Startup Issue
Posted: Fri Mar 14, 2014 3:21 pm
by xcomm
have been trying to execute the init script "service nagios start" as root.
The init.d/nagios is configure as user/group nagios.
The file permissions are 100% out of the way and it still errors on those two dir.
right now i am just running nagios -d (configpath)
then killing the process and removing the files that are specified under the init scripts stop section.
Re: Nagios Core Startup Issue
Posted: Mon Mar 17, 2014 8:10 am
by scottwilkerson
What do you get if you run the following
Code: Select all
su nagios -c 'ls -la /etc/nagios/private/resource.cfg'
Re: Nagios Core Startup Issue
Posted: Tue Mar 18, 2014 1:36 pm
by xcomm
-rwxr-xr-x. 1 root root 892 Mar 18 13:36 /etc/nagios/private/resource.cfg
Re: Nagios Core Startup Issue
Posted: Tue Mar 18, 2014 5:22 pm
by scottwilkerson
The dot at the end of the file permissions leads me to believe we migh have SELinux permissions set on the file...
Is SELINUX enabled on the machine?
Re: Nagios Core Startup Issue
Posted: Tue Mar 18, 2014 6:35 pm
by xcomm
BAM!!!
Works once I know the system was running SELINUX.
Why its always good idea to check the installed packages when you dont install the OS.
Thanks again for all the help when it came down to a system issue.
Re: Nagios Core Startup Issue
Posted: Wed Mar 19, 2014 9:16 am
by tmcdonald
Good to hear! I'll be locking this thread now but feel free to open another if you need help in the future.