错误在自定义创建Perl插件??没有权限



我是新的perl所以需要你的帮助很多我尝试创建perl插件使用这个链接,

http://itwarriors.com/?p=1

我已经在(/usr/local/nagios/libexec)中创建了文件名check_test.pl,

#! /usr/bin/perl
use strict;
use Getopt::Long qw(:config no_ignore_case);
my ($host, $server, $instances);
my $result = GetOptions(
“H|host=s” => $host,
“s|server=s” => $server,
“i|instances=s” => $instances,
);
print “My host IP is $hostn”;
print “My Server IP is $servern”;
print “Times Server found are $instancesn”;

和得到这个错误后,

[root@localhost libexec]# ./check_test.pl -h 192.168.1.101 -s 192.168.1.110 -ibash: ./check_test.pl: Permission denied

我试着添加,

# 'check_test' command definition
define command{
command_name    check_test
command_line    $USER1$/check_test.pl -H $HOSTADDRESS$ -s 12489 
}

command .cfg中的命令

而不是我得到错误权限拒绝,请为这个错误hekp,实际上错误是什么??

我认为你的脚本需要执行权限:

chmod +x check_test.pl