nagios 4.0.6 - make install-init issue

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
GeoffMontee
Posts: 4
Joined: Mon Jul 14, 2014 6:54 am

nagios 4.0.6 - make install-init issue

Post 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)?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: nagios 4.0.6 - make install-init issue

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
GeoffMontee
Posts: 4
Joined: Mon Jul 14, 2014 6:54 am

Re: nagios 4.0.6 - make install-init issue

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: nagios 4.0.6 - make install-init issue

Post by lmiltchev »

Fair enough. Let us know if we can lock this thread.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked