Code: Select all
ls -al /usr/local/nagios/var/nagios.configtest
ls -al /usr/local/nagios/var
ls -al /usr/local/nagios
Code: Select all
ls -al /usr/local/nagios/var/nagios.configtest
ls -al /usr/local/nagios/var
ls -al /usr/local/nagios
Code: Select all
ls -al /usr/local/nagios/var/nagios.configtest
ls: /usr/local/nagios/var/nagios.configtest: No such file or directory
ls -al /usr/local/nagios/var
total 104
drwxrwxrwx 9 nagios nagios 306 Aug 31 19:46 .
drwxr-xr-x 8 root wheel 272 Aug 18 16:11 ..
drwxrwxr-x 8 nagios nagios 272 Aug 31 00:00 archives
-rw-r--r-- 1 nagios nagios 4041 Aug 31 17:33 nagios.log
-rw-r--r-- 1 nagios nagios 12655 Aug 28 15:12 objects.cache
-rw-r--r-- 1 nagios nagios 12655 Aug 31 15:40 objects.precache
-rw------- 1 nagios nagios 13369 Aug 31 17:33 retention.dat
drwxrwsr-x 2 nagios nagios 68 Aug 31 17:33 rw
drwxr-xr-x 3 root nagios 102 Aug 18 16:01 spool
ls -al /usr/local/nagios
total 0
drwxr-xr-x 8 root wheel 272 Aug 18 16:11 .
drwxr-xr-x 29 root wheel 986 Aug 18 16:01 ..
drwxrwxr-x 4 nagios nagios 136 Aug 31 18:53 bin
drwxrwxr-x 10 nagios nagios 340 Aug 31 19:00 etc
drwxrwxr-x 2 nagios nagios 68 Aug 18 16:01 libexec
drwxrwxr-x 21 nagios nagios 714 Aug 31 18:53 sbin
drwxrwxr-x 37 nagios nagios 1258 Aug 31 18:53 share
drwxrwxrwx 9 nagios nagios 306 Aug 31 19:46 var
Code: Select all
touch /usr/local/nagios/var/nagios.configtest
chown nagios:nagios /usr/local/nagios/var/nagios.configtest
chmod ug+wx /usr/local/nagios/var/nagios.configtest
Code: Select all
chown nagios:nagios /usr/local/nagios/var/nagios.configtest
Code: Select all
if ! su $NagiosUser -c "touch $NagiosCfgtestFile"; then
echo "ERROR: Could not create or update '$NagiosCfgtestFile'"
exit 8
fi
If you changed the file to be something specific, if should be nagios. What do you mean when you checked NagiosUser, it was blank? Are you saying you echoed the variable?Aelonia wrote: When I checked NagiosUser, though, it was blank. When I changed that to my username, I had to enter a password but I was able to run that 'su' line,
Yeah, which I guess isn't terribly useful. Just really not sure why sudo /etc/rc.d/init.d/nagios start isn't working for me.dwhitfield wrote: If you changed the file to be something specific, if should be nagios. What do you mean when you checked NagiosUser, it was blank? Are you saying you echoed the variable?
Don't be so sure. If you don't have a nagios user, that could be a clue as to what is going on. Can you post your nagios.cfg? Also, what's the output of chage nagios -lAelonia wrote:
Yeah, which I guess isn't terribly useful.
Code: Select all
checkconfig="true"
Code: Select all
checkconfig="false"
Code: Select all
cd /tmp/nagioscore-nagios-4.3.4/
sudo ./configure --with-httpd-conf=/opt/local/apache2/conf/extra --with-gd-lib=/opt/local/lib --with-gd-inc=/opt/local/include
sudo make all