How can I fix that return code?
Asked
Active
Viewed 1.0k times
2 Answers
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
- Give permission using ACL.
setfacl -m u:nagios:rwx /usr/lib/nagios/plugins/plugin_name.pl
- Give permission (use only in test environment)
chmod 777 /usr/lib/nagios/plugins/plugin_name.pl
- 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