(SOLVED) Problem installing Nagios Plugins

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
nstoyanov
Posts: 4
Joined: Wed Apr 05, 2017 9:27 am

(SOLVED) Problem installing Nagios Plugins

Post 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!
Last edited by nstoyanov on Fri May 19, 2017 8:44 am, edited 1 time in total.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Problem installing Nagios Plugins

Post 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
blackrino9
Posts: 27
Joined: Wed Apr 12, 2017 7:19 pm

Re: Problem installing Nagios Plugins

Post 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.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Problem installing Nagios Plugins

Post 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.
nstoyanov
Posts: 4
Joined: Wed Apr 05, 2017 9:27 am

Re: Problem installing Nagios Plugins

Post 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 :).
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Problem installing Nagios Plugins

Post 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.
nstoyanov
Posts: 4
Joined: Wed Apr 05, 2017 9:27 am

Re: Problem installing Nagios Plugins

Post 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.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: (SOLVED) Problem installing Nagios Plugins

Post 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.
nstoyanov
Posts: 4
Joined: Wed Apr 05, 2017 9:27 am

Re: (SOLVED) Problem installing Nagios Plugins

Post 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. :D 8-)
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: (SOLVED) Problem installing Nagios Plugins

Post 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.
Locked