Page 1 of 1
(SOLVED) Problem installing Nagios Plugins
Posted: Thu May 18, 2017 10:56 am
by nstoyanov
Hello dear Nagios community,
I am working on installing Nagios Core on Ubuntu Server 16.04 LTS. Everything was going great (following the install guide) until I reached the point of installing nagios-plugins-release-2.2.1. I get an "access denied" error when I do "sudo make install" :
Code: Select all
Making install in po
make[1]: Entering directory '/tmp/nagios-plugins-release-2.2.1/po'
/usr/local/nagios/share
make[1]: execvp: /usr/local/nagios/share: Permission denied
Makefile:257: recipe for target 'install-data-yes' failed
make[1]: *** [install-data-yes] Error 127
make[1]: Leaving directory '/tmp/nagios-plugins-release-2.2.1/po'
Makefile:1541: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
Any ideas why permissions would be denied even though the command is run with sudo? I do not see any errors up to this point in the compile and install process for the plugins.
Any help is greatly appreciated!
Thank you!
Re: Problem installing Nagios Plugins
Posted: Thu May 18, 2017 3:33 pm
by dwhitfield
What is the output of the two following commands? Please put the output in a code block. The button is the fifth from the left on the post input screen (between Quote and List).
Code: Select all
ls -la /usr/local/nagios/share
sestatus
Re: Problem installing Nagios Plugins
Posted: Thu May 18, 2017 3:34 pm
by blackrino9
A good place to start would be to check the permissions are on the destination folder.
ls -lh /usr/local/nagios
see who the user and group owners are on that destination and what permissions they have.
Re: Problem installing Nagios Plugins
Posted: Thu May 18, 2017 3:37 pm
by dwhitfield
blackrino9 wrote:
ls -lh /usr/local/nagios
This could be useful if you get other permissions errors. You can add it to another code block with the output of the commands I suggested too.
Re: Problem installing Nagios Plugins
Posted: Fri May 19, 2017 8:44 am
by nstoyanov
Gentlemen, thank you for the prompt reply!
Because I had followed the instructions literally, I was working on the nagios plugins in the tmp folder. I had to reboot, which erased my progress, so I had to start installing the plugins from scratch. This time everything went through! The problem has been resolved.
Again, thank you for the prompt reply. Hopefully I will not have to bug you again
.
Re: Problem installing Nagios Plugins
Posted: Fri May 19, 2017 9:05 am
by dwhitfield
nstoyanov wrote:
Because I had followed the instructions literally
Which instructions? Not all distros clear tmp on reboot, but we can make a note that that's a possibility.
Re: Problem installing Nagios Plugins
Posted: Mon May 22, 2017 10:14 am
by nstoyanov
dwhitfield wrote:nstoyanov wrote:
Because I had followed the instructions literally
Which instructions? Not all distros clear tmp on reboot, but we can make a note that that's a possibility.
The installation instructions for Ubuntu:
https://support.nagios.com/kb/article/n ... tml#Ubuntu
Compiling is done in /tmp, and upon reboot the OS (Ubuntu Server 16.04 LTS) cleared it.
Thank you.
Re: (SOLVED) Problem installing Nagios Plugins
Posted: Mon May 22, 2017 10:25 am
by dwhitfield
The compile should install things to
/usr/local. You can see that in your original error message:
Code: Select all
make[1]: execvp: /usr/local/nagios/share: Permission denied
Our instructions don't say to reboot, so I'm a little confused about what actually happened. Did you get a message during compile that said you needed to reboot? Maybe that's something that should be changed in the code itself, rather than the instructions.
Re: (SOLVED) Problem installing Nagios Plugins
Posted: Mon May 22, 2017 10:42 am
by nstoyanov
dwhitfield wrote:The compile should install things to
/usr/local. You can see that in your original error message:
Code: Select all
make[1]: execvp: /usr/local/nagios/share: Permission denied
Our instructions don't say to reboot, so I'm a little confused about what actually happened. Did you get a message during compile that said you needed to reboot? Maybe that's something that should be changed in the code itself, rather than the instructions.
My apologies, I did not mean to cause confusion. My machine rebooted inadvertently while working on installing Nagios Core, and when I tried installing the nagios plugins again after the reboot, the process actually worked. The instructions did not ask for a reboot, just to download, compile, and install, from the /tmp folder. Because I rebooted, the /tmp had gotten cleared and I had to start the installation process for the nagios plugins from scratch, just to discover that the problem had gone away.
Re: (SOLVED) Problem installing Nagios Plugins
Posted: Mon May 22, 2017 11:06 am
by dwhitfield
Thank you! This makes a lot of sense now. I mentioned this to our documentation team. I am not sure what they will do since we've long used /tmp for installs, but seems like a note about rebooting would be easy enough.