Plugin could not be installed - directory permissions may be

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ecarrasq
Posts: 244
Joined: Tue Feb 22, 2011 5:58 pm

Plugin could not be installed - directory permissions may be

Post by ecarrasq »

When I try to add a Plugin using the "Admin > Manage Plugins" I get the following error message:
Plugin could not be installed - directory permissions may be incorrect.
Info of my system:
**NagiosXi 2011R1.3
**Linux Distribution and version: CentOS 5.4 32bit
**VMware Image: yes
**No special configurations on the system.

I've added numerous plugins about 3 weeks ago with no problems, but not able to now.
Note: I ssh into my Nagios server and looked at the owners for /usr/local/nagios and it was "apache". Apache was also owning most the configuration files along with some directories such as /usr/local/nagios/etc

Don't know if this is related, or how it happened.

Please help, thank you.
Last edited by ecarrasq on Fri Jul 15, 2011 2:02 pm, edited 1 time in total.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Plugin could not be installed - directory permissions ma

Post by lmiltchev »

What plugin are you trying to install in particular?
Are you having issues with this plugin only or now you get "Plugin could not be installed - directory permissions may be incorrect" every time you try to install a plugin?
Run in terminal (as root):
# /usr/local/nagiosxi/scripts/reset_config_perms
# service nagios restart
# service httpd restart
Try again installing the plugin again. If you are still having issues, run in terminal:
# ls -l /usr/local/nagios
# ls -l /usr/local/nagios/libexic
Post the output of these two commands, so we can take a loot at it.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ecarrasq
Posts: 244
Joined: Tue Feb 22, 2011 5:58 pm

Re: Plugin could not be installed - directory permissions ma

Post by ecarrasq »

What plugin are you trying to install in particular?
check_ssh_faillogin.tar.gz but happens with other plugins I try to install as well.
Are you having issues with this plugin only or now you get "Plugin could not be installed - directory permissions may be incorrect" every time you try to install a plugin?
happens with other plugins I try to install.


Unsuccessful with the first suggestion:

Run in terminal (as root):
# /usr/local/nagiosxi/scripts/reset_config_perms
# service nagios restart
# service httpd restart

Output of:
# ls -l /usr/local/nagios:
drwxr-xr-x 2 nagios nagios 4096 Jun 8 10:01 bin
drwxrwsr-x 8 apache nagios 4096 Jul 15 07:57 etc
drwxr-xr-x 2 nagios nagios 12288 Jun 9 08:31 libexec
drwxrwxr-x 2 nagios nagios 4096 Feb 21 13:51 sbin
drwxrwxr-x 12 nagios nagios 4096 Feb 21 13:51 share
drwxrwxr-x 6 nagios nagios 4096 Jul 15 10:44 var


Output of:
# ls -l /usr/local/nagios/libexec:
total 5624
-rwxr-xr-x 1 root nagios 73078 Apr 16 11:30 check_apt
-rwxr-xr-x 1 root root 6897 Apr 16 11:32 check_asterisk.pl
-rwxr-xr-x 1 root root 1978 Apr 16 11:32 check_asterisk_sip_peers.sh
-rwxr-xr-x 1 nagios nagios 4839 Feb 22 14:52 check_basicauth.pl
-rwxr-xr-x 1 nagios nagios 2289 Apr 1 12:11 check_bpi.php
-rwxr-xr-x 1 root nagios 2274 Apr 16 11:30 check_breeze
-rwxr-xr-x 1 root nagios 85065 Apr 16 11:30 check_by_ssh
lrwxrwxrwx 1 root nagios 9 Apr 16 11:30 check_clamd -> check_tcp
-rwxr-xr-x 1 root nagios 49394 Apr 16 11:30 check_cluster
-rw-r--r-- 1 root root 9248 Jun 9 08:31 check_command.py
-rwxr-xr-x 1 root root 5355 Apr 16 11:32 check_cpu_stats.sh
-rwxr-xr-x 1 nagios nagios 8762 Feb 22 15:11 check_curl.php
-rwxr-xr-x 1 nagios nagios 32301 Feb 22 14:45 check_dell_openmanage.pl
-rwxr-xr-x 1 nagios nagios 61125 Mar 22 08:20 check_dell_ups.pl
-r-sr-xr-x 1 root nagios 81038 Apr 16 11:30 check_dhcp
-rwxr-xr-x 1 root nagios 80497 Apr 16 11:30 check_dig
-rwxr-xr-x 1 root nagios 117629 Apr 16 11:30 check_disk
-rwxr-xr-x 1 root nagios 8163 Apr 16 11:30 check_disk_smb
-rwxr-xr-x 1 root nagios 86534 Apr 16 11:30 check_dns
-rwxr-xr-x 1 root nagios 45127 Apr 16 11:30 check_dummy
-rw-r--r-- 1 root root 3867 Jun 9 08:31 check_dummy.py
-rwxr-xr-x 1 nagios nagios 5625 Feb 22 14:45 check_em01.pl
-rwxr-xr-x 1 nagios nagios 38345 Aug 18 2010 check_email_delivery
-rwxr-xr-x 1 nagios nagios 20511 Aug 18 2010 check_email_delivery_epn
-rwxr-xr-x 1 nagios nagios 13498 Jan 11 2010 check_email_loop.pl
-rwxr-xr-x 1 nagios nagios 82841 Feb 22 14:46 check_esx3.pl
-rw-r--r-- 1 root root 15577 Jun 9 08:31 check_eventlog.py
-rwxr-xr-x 1 root nagios 3143 Apr 16 11:30 check_file_age
-rw-r--r-- 1 root root 20107 Jun 9 08:31 check_file.py
-rwxr-xr-x 1 root nagios 6395 Apr 16 11:30 check_flexlm
-rwxr-xr-x 1 nagios nagios 3828 Feb 22 15:00 check_form_mech.py
-rwxr-xr-x 1 nagios nagios 4978 Feb 22 14:58 check_form.pl
-rwxr-xr-x 1 root nagios 93944 Apr 16 11:30 check_fping
lrwxrwxrwx 1 root nagios 9 Apr 16 11:30 check_ftp -> check_tcp
-rwxr-xr-x 1 nagios nagios 3437 Aug 18 2010 check_ftp_fully
-rw-r--r-- 1 root root 11816 Jun 9 08:31 check_groupshield.py
-rwxr-xr-x 1 root nagios 88650 Apr 16 11:30 check_hpjd
-rwxr-xr-x 1 root nagios 190190 Apr 16 11:30 check_http
-rwxr-xr-x 1 nagios nagios 2989 Feb 22 15:11 check_http_content
-rwxr-xr-x 1 nagios nagios 2597 Feb 22 15:11 check_http_header.pl
-rwxr-xr-x 1 nagios nagios 3215 Feb 22 15:12 check_httpproxy.sh
-rwxr-xr-x 1 nagios nagios 3690 Feb 22 14:59 check_http_redirect.pl
-rwxr-xr-x 1 nagios nagios 5497 Feb 22 15:11 Check_HTTP_Requisites.py
-rwxr-xr-x 1 nagios nagios 1909 Feb 22 15:12 check_ichains_0.1.tgz
-r-sr-xr-x 1 root nagios 87238 Apr 16 11:30 check_icmp
-rwxr-xr-x 1 root nagios 55649 Apr 16 11:30 check_ide_smart
-rwxr-xr-x 1 root nagios 15310 Apr 16 11:30 check_ifoperstatus
-rwxr-xr-x 1 root nagios 12853 Apr 16 11:30 check_ifstatus
lrwxrwxrwx 1 root nagios 9 Apr 16 11:30 check_imap -> check_tcp
-rwxr-xr-x 1 nagios nagios 35413 Aug 18 2010 check_imap_receive
-rwxr-xr-x 1 nagios nagios 15576 Aug 18 2010 check_imap_receive_epn
-rwsr-xr-x 1 root nagios 748 Apr 16 11:32 check_init_service
-rw-r--r-- 1 root root 8309 Jun 9 08:31 check_ipconfig.py
-rwxr-xr-x 1 root nagios 7429 Apr 16 11:30 check_ircd
lrwxrwxrwx 1 root nagios 9 Apr 16 11:30 check_jabber -> check_tcp
-rwxr-xr-x 1 root nagios 66419 Apr 16 11:30 check_ldap
lrwxrwxrwx 1 root nagios 10 Apr 16 11:30 check_ldaps -> check_ldap
-rwxr-xr-x 1 root nagios 73492 Apr 16 11:30 check_load
-rwxr-xr-x 1 root nagios 6062 Apr 16 11:30 check_log
-rw-r--r-- 1 root root 14324 Jun 9 08:31 check_mailflow.py
-rwxr-xr-x 1 root nagios 20367 Apr 16 11:30 check_mailq
-rw-r--r-- 1 root root 12665 Jun 9 08:31 check_memory.py
-rwxr-xr-x 1 root nagios 55882 Apr 16 11:30 check_mrtg
-rwxr-xr-x 1 root nagios 54781 Apr 16 11:30 check_mrtgtraf
-rw-r--r-- 1 root root 15441 Jun 9 08:31 check_mscluster.py
-rwxr-xr-x 1 root nagios 81910 Apr 16 11:30 check_mysql
-rwxr-xr-x 1 root nagios 77910 Apr 16 11:30 check_mysql_query
-rwxr-xr-x 1 root nagios 68342 Apr 16 11:30 check_nagios
-rwxr-xr-x 1 nagios nagios 6367 Feb 22 14:46 check_nagios_performance.php
-rwxr-xr-x 1 nagios nagios 17203 Feb 22 14:46 check_nagiosxiserver.php
-rw-r--r-- 1 root root 10112 Jun 9 08:31 check_netshares.py
-rwxr-xr-x 1 root root 25602 Apr 16 11:32 check_netstat.pl
lrwxrwxrwx 1 root nagios 9 Apr 16 11:30 check_nntp -> check_tcp
lrwxrwxrwx 1 root nagios 9 Apr 16 11:30 check_nntps -> check_tcp
-rwxrwxr-x 1 nagios nagios 62333 Apr 16 11:31 check_nrpe
-rwxr-xr-x 1 root nagios 79999 Apr 16 11:30 check_nt
-rwxr-xr-x 1 root nagios 81842 Apr 16 11:30 check_ntp
-rwxr-xr-x 1 root nagios 76352 Apr 16 11:30 check_ntp_peer
-rwxr-xr-x 1 root nagios 72850 Apr 16 11:30 check_ntp_time
-rwxr-xr-x 1 root nagios 105561 Apr 16 11:30 check_nwstat
-rw-r--r-- 1 root root 6744 Jun 9 08:31 check_onlineupdates.py
-rwxr-xr-x 1 root root 3259 Apr 16 11:32 check_open_files.pl
-rwxr-xr-x 1 root nagios 8366 Apr 16 11:30 check_oracle
-rwxr-xr-x 1 root nagios 68473 Apr 16 11:30 check_overcr
-rw-r--r-- 1 root root 14395 Jun 9 08:31 check_pagefile.py
-rw-r--r-- 1 root root 7637 Jun 9 08:31 check_perfcounter.py
-rwxr-xr-x 1 root nagios 65251 Apr 16 11:30 check_pgsql
-rwxr-xr-x 1 nagios nagios 3353 Feb 22 15:12 check_php_sess_1.2
-rwxr-xr-x 1 root nagios 97612 Apr 16 11:30 check_ping
-rwxr-xr-x 1 nagios nagios 6183 Jun 8 10:01 check_pnp_rrds.pl
lrwxrwxrwx 1 root nagios 9 Apr 16 11:30 check_pop -> check_tcp
-rw-r--r-- 1 root root 1070 Jun 9 08:31 check_postfix_deferred
-rwxr-xr-x 1 nagios nagios 2081 Feb 22 15:12 check_pound_stat.pl
-rw-r--r-- 1 root root 13825 Jun 9 08:31 check_printers.py
-rw-r--r-- 1 root root 9847 Jun 9 08:31 check_processes.py
-rw-r--r-- 1 root root 9137 Jun 9 08:31 check_processor.py
-rwxr-xr-x 1 root nagios 88917 Apr 16 11:30 check_procs
-rwxr-xr-x 1 nagios nagios 23327 Aug 18 2010 check_radius_adv
-rwxr-xr-x 1 root nagios 65683 Apr 16 11:30 check_real
-rwxr-xr-x 1 root nagios 9707 Apr 16 11:30 check_rpc
-rwxr-xr-x 1 nagios nagios 9232 Jan 11 2010 check_rrdtraf
-rwxr-xr-x 1 nagios nagios 5299 Jan 11 2010 check_rrdtraf.php
-rwxr-xr-x 1 nagios nagios 313547 Feb 22 15:12 check_selenium.tar.gz
-rwxr-xr-x 1 root nagios 1176 Apr 16 11:30 check_sensors
-rw-r--r-- 1 root root 8110 Jun 9 08:31 check_service.py
-rwxr-xr-x 1 root root 2174 Apr 16 11:32 check_services
-rw-r--r-- 1 root root 12919 Jun 9 08:31 check_shadowcopy.py
lrwxrwxrwx 1 root nagios 9 Apr 16 11:30 check_simap -> check_tcp
-rwxr-xr-x 1 root root 7599 Apr 16 11:32 check_sip
-rwxr-xr-x 1 root nagios 119594 Apr 16 11:30 check_smtp
-rwxr-xr-x 1 nagios nagios 20226 Aug 18 2010 check_smtp_send
-rwxr-xr-x 1 nagios nagios 10440 Aug 18 2010 check_smtp_send_epn
-rwxr-xr-x 1 root nagios 144462 Apr 16 11:30 check_snmp
-rwxr-xr-x 1 nagios nagios 10951 Jan 11 2010 check_snmp_boostedge.pl
-rwxr-xr-x 1 nagios nagios 17866 Jan 11 2010 check_snmp_cpfw.pl
-rwxr-xr-x 1 nagios nagios 8747 Jan 11 2010 check_snmp_css_main.pl
-rwxr-xr-x 1 nagios nagios 16786 Jan 11 2010 check_snmp_css.pl
-rwxr-xr-x 1 nagios nagios 33562 Jan 11 2010 check_snmp_env.pl
-rwxr-xr-x 1 nagios nagios 31919 Jan 11 2010 check_snmp_int.pl
-rwxr-xr-x 1 nagios nagios 10108 Jan 11 2010 check_snmp_linkproof_nhr.pl
-rwxr-xr-x 1 nagios nagios 22965 Jan 11 2010 check_snmp_load.pl
-rwxr-xr-x 1 nagios nagios 18734 Jan 11 2010 check_snmp_mem.pl
-rwxr-xr-x 1 nagios nagios 11898 Jan 11 2010 check_snmp_nsbox.pl
-rwxr-xr-x 1 nagios nagios 42659 Mar 14 11:10 check_snmp_printer_args.sh
-rwxr-xr-x 1 nagios nagios 24233 Jan 11 2010 check_snmp_process.pl
-rwxr-xr-x 1 nagios nagios 24002 Jan 11 2010 check_snmp_storage.pl
-rwxr-xr-x 1 nagios nagios 14489 Jan 11 2010 check_snmp_vrrp.pl
-rwxr-xr-x 1 nagios nagios 11967 Jan 11 2010 check_snmp_win.pl
lrwxrwxrwx 1 root nagios 9 Apr 16 11:30 check_spop -> check_tcp
-rwxr-xr-x 1 nagios nagios 7339 Feb 22 15:12 check_squid.pl
-rwxr-xr-x 1 nagios nagios 3529 Feb 22 15:12 check_squid_proxy.pl
-rwxr-xr-x 1 root nagios 64291 Apr 16 11:30 check_ssh
-rwxr-xr-x 1 nagios nagios 8333 Feb 22 14:46 check_ssh_expect.pl
lrwxrwxrwx 1 root nagios 9 Apr 16 11:30 check_ssmtp -> check_tcp
-rw-r--r-- 1 root root 4316 Jun 9 08:31 CHECKS.txt
-rwxr-xr-x 1 root nagios 77708 Apr 16 11:30 check_swap
-rw-r--r-- 1 root root 12903 Jun 9 08:31 check_taskscheduler.py
-rwxr-xr-x 1 root nagios 105711 Apr 16 11:30 check_tcp
-rw-r--r-- 1 root root 8369 Jun 9 08:31 check_tcp.py
-rwxr-xr-x 1 root nagios 67802 Apr 16 11:30 check_time
-rwxr-xr-x 1 apache apache 5658 Apr 27 07:38 check_time_snmp.pl
-rwxr-xr-x 1 apache apache 3365 Apr 27 07:39 check_timestamp
lrwxrwxrwx 1 root nagios 9 Apr 16 11:30 check_udp -> check_tcp
-rwxr-xr-x 1 root nagios 74077 Apr 16 11:30 check_ups
-rw-r--r-- 1 root root 9736 Jun 9 08:31 check_uptime.py
-rwxr-xr-x 1 nagios nagios 1600 Feb 22 15:12 check_url.pl
-rwxr-xr-x 1 nagios nagios 6845 Feb 22 15:12 check_url_status
-rw-r--r-- 1 root root 6945 Jun 9 08:31 check_userquota.py
-rwxr-xr-x 1 root nagios 72471 Apr 16 11:30 check_users
-rwxr-xr-x 1 nagios nagios 1567 Feb 22 15:12 check_varnish_health
-rw-r--r-- 1 root root 8549 Jun 9 08:31 check_virusscan.py
-rwxr-xr-x 1 nagios nagios 169 Feb 22 14:46 check_vmware_config_vcenter01_example
-rwxr-xr-x 1 nagios nagios 59991 Feb 22 14:46 check_vmware.pl
-rw-r--r-- 1 root root 410 Jun 9 08:31 check_vmware.sh
-rwxr-xr-x 1 root nagios 3019 Apr 16 11:30 check_wave
-rwxr-xr-x 1 nagios nagios 307 Jan 11 2010 check_webinject.sh
-rwxr-xr-x 1 nagios nagios 722 Feb 22 15:12 check_website
-rwxr-xr-x 1 nagios nagios 1052 Feb 22 15:12 check_website.php
-rwxr-xr-x 1 nagios nagios 3951 Feb 22 15:12 check_website_response.sh
-rw-r--r-- 1 root root 15906 Jun 9 08:31 check_win_disk.py
-rwxr-xr-x 1 root root 710 Apr 16 11:32 check_yum
-rw-r--r-- 1 root root 38663 Jun 9 08:31 COPYRIGHT
-rwxr-xr-x 1 root root 2845 Apr 16 11:32 custom_check_mem
-rwxr-xr-x 1 root root 915 Apr 16 11:32 custom_check_procs
-rw-r--r-- 1 root root 5466 Jun 9 08:31 inspect_onlineupdates.py
-rw-r--r-- 1 root root 692 Jun 9 08:31 INSTALL.txt
-rw-r--r-- 1 root root 38675 Jun 9 08:31 License.rtf
-rw-r--r-- 1 root root 10234 Jun 9 08:31 Makefile
-rw-r--r-- 1 root root 858 Jun 9 08:31 misc.py
-rw-r--r-- 1 root root 7733 Jun 9 08:31 nagiosplugincol.wxs
-rwxr-xr-x 1 root root 4176 Apr 16 11:32 nagisk.pl
-rwxr-xr-x 1 root nagios 69513 Apr 16 11:30 negate
-rwxr-xr-x 1 nagios nagios 42724 Jun 8 10:01 process_perfdata.pl
-rw-r--r-- 1 root root 2010 Jun 9 08:31 Releasenotes.txt
-rw-r--r-- 1 root root 9181 Jun 9 08:31 send_mailflow.py
-rwxr-xr-x 1 nagios nagios 47422 Apr 16 11:32 send_nsca
-rw-r--r-- 1 root root 289 Jun 9 08:31 TODO.txt
-rwxr-xr-x 1 root nagios 71394 Apr 16 11:30 urlize
-rwxr-xr-x 1 root nagios 2070 Apr 16 11:30 utils.pm
-rwxr-xr-x 1 root nagios 862 Apr 16 11:30 utils.sh
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Plugin could not be installed - directory permissions ma

Post by lmiltchev »

OK. Run in terminal:

# /usr/local/nagiosxi/scripts/fixperms.sh

This command will fix your permissions, but after this you have to run:

# chown root.nagios /usr/local/nagiosxi/scripts/reset_config_perms
# chmod u+s /usr/local/nagiosxi/scripts/reset_config_perms
# chown root.nagios /usr/local/nagiosxi/scripts/reset_config_perms.sh
# chmod u+s /usr/local/nagiosxi/scripts/reset_config_perms.sh

And finally:

# service nagios restart
# service httpd restart

Try this and let us know if it worked.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ecarrasq
Posts: 244
Joined: Tue Feb 22, 2011 5:58 pm

Re: Plugin could not be installed - directory permissions ma

Post by ecarrasq »

SUCCESS!!!!
New plugin was installed successfully.
THANK YOU!!!

I did what you suggested below and all works well now:

# /usr/local/nagiosxi/scripts/fixperms.sh

This command will fix your permissions, but after this you have to run:

# chown root.nagios /usr/local/nagiosxi/scripts/reset_config_perms
# chmod u+s /usr/local/nagiosxi/scripts/reset_config_perms
# chown root.nagios /usr/local/nagiosxi/scripts/reset_config_perms.sh
# chmod u+s /usr/local/nagiosxi/scripts/reset_config_perms.sh

And finally:

# service nagios restart
# service httpd restart
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Plugin could not be installed - directory permissions ma

Post by lmiltchev »

Thank you for the feedback!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked