3

How can I fix that return code?

enter image description here

Community
  • 1
  • 1
kostiamol
  • 309
  • 2
  • 4
  • 15
  • 1
    Please don't add screenshots of text, but place the actual text (indented with 4 spaces so it will show up like code). – Itai Bar-Haim May 11 '16 at 20:38

2 Answers2

3

It is due to permission issue with the particular plugin. Allow nagios user to access plugin.

You can use multiple options for it as below

  1. Give permission using ACL.

setfacl -m u:nagios:rwx /usr/lib/nagios/plugins/plugin_name.pl

  1. Give permission (use only in test environment)

chmod 777 /usr/lib/nagios/plugins/plugin_name.pl

  1. Change owner of the file

chown nagios /usr/lib/nagios/plugins/plugin_name.pl

cross check permission using below command

ls -l /usr/lib/nagios/plugins/plugin_name.pl

1

Solution that helped me:

1. sudo su -
2. cd /usr/local/nagios
3. chmod -R 755 *
4. exit
5. su - nagios

6. check any file

Paulo Boaventura
  • 1,365
  • 1
  • 9
  • 29
kostiamol
  • 309
  • 2
  • 4
  • 15