Page 1 of 1

nagios 4.0.6 - make install-init issue

Posted: Mon Jul 14, 2014 9:56 am
by GeoffMontee
As I mentioned in another thread, I'm compiling Nagios 4.0.6 from source in a CentOS 6 environment in which I don't have root or sudo privileges. Therefore, Nagios only has a few users, groups, and directories it can work with. I'm compiling by doing the following:

Code: Select all

./configure --prefix=/opt/nagios --with-nagios-user=monitor --with-nagios-group=monitor --with-command-user=monitor --with-command-group=monitor --with-init-dir=/home/monitor/scripts --with-lockfile=/home/monitor/nagios.lock --with-httpd-conf=/home/monitor/conf/httpd
make all
Then following up with:

Code: Select all

make install-init
I have to pass the --ignore-errors flag to make here, because I encounter a couple errors:

Code: Select all

> make --ignore-errors install-init
/usr/bin/install -c -m 755 -d -o root -g root /home/monitor/scripts
/usr/bin/install: cannot change owner and permissions of `/home/monitor/scripts': Operation not permitted
make: [install-daemoninit] Error 1 (ignored)
/usr/bin/install -c -m 755 -d -o root -g root daemon-init /home/monitor/scripts/nagios
/usr/bin/install: cannot change ownership of `/home/monitor/scripts/nagios': Operation not permitted
make: [install-daemoninit] Error 1 (ignored)
It seems unusual that this tries to install the init script with the owner/group set to root/root, since I specified two different sets of users account flags during configure, and neither was root/root. Maybe a third set needs to be added (e.g. --with-init-user/--with-init-group)?

Re: nagios 4.0.6 - make install-init issue

Posted: Mon Jul 14, 2014 2:03 pm
by sreinhardt
These should not impact you, and it is perfectly normal for init scripts to be owned by root. Reason being that you wouldn't want unauthorized changes to your init scripts that start vital system functions. If those are they only errors you are getting, you are probably all set to start nagios, short of the other make install commands, that you hopefully ran already. You will need to make sure you have access to restart apache services and modify the configs so that nagios will be accessible via the web, unless this is not needed.

Re: nagios 4.0.6 - make install-init issue

Posted: Mon Jul 14, 2014 4:41 pm
by GeoffMontee
Thanks for the response. I understand that it is normal for init scripts to be owned by root under normal circumstances. However, it just seems odd that it is required to use something like --ignore-errors when building as a user other than root. It seems like a bug to me, so I thought I'd report it.

Re: nagios 4.0.6 - make install-init issue

Posted: Tue Jul 15, 2014 10:44 am
by lmiltchev
Fair enough. Let us know if we can lock this thread.