Parece que no es eso porque lo único que he hecho es quitarle derechos de escritura que no afecta para nada.
Esto es lo que tenia antes
-rwxrwxr-x 1 pandora users 3416 feb 1 16:49 check_esx_wbem.py
y esto lo que tengo ahora
-rwxr-xr-x 1 pandora users 3416 feb 1 16:49 check_esx_wbem.py
Me sigue saliendo el mismo error aún después de haber cambiado los permisos y reiniciar el servidor de pandora.
La verdad es que no tengo ni idea de porque está fallando.
Según lo que entiendo con el error es que primero no puede asignar el valor de $output porque tiene permisos denegados (cosa que no es cierta porque si que los tiene), eso el primer error (linea 49) y la segunda como $output no tiene valor da error a la hora de hacer el print (en la linea 59). ¿Cómo se soluciona?
Paso el pandora_exec por si le puedes echar un vistazo.
1 #!/usr/bin/perl
2
3 eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
4 if 0; # not running under some shell
5 ##########################################################################
6 # pandora_exec
7 #
8 # Executes the given command and prints its output to stdout. If the
9 # execution times out or the command does not exist nothing is printed
10 # to stdout. This is part of Pandora FMS Plugin server, do not delete!.
11 #
12 # Usage: pandora_exec <timeout in seconds> <command>
13 ##########################################################################
14 # Copyright (c) 2008 Ramon Novoa, rnovoa@gmail.com
15 # (c) 2008 Artica Soluciones Tecnologicas S.L
16 #
17 # This program is free software; you can redistribute it and/or
18 # modify it under the terms of the GNU General Public License
19 # as published by the Free Software Foundation; version 2.
20 #
21 # This program is distributed in the hope that it will be useful,
22 # but WITHOUT ANY WARRANTY; without even the implied warranty of
23 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 # GNU General Public License for more details.
25 # You should have received a copy of the GNU General Public License
26 # along with this program; if not, write to the Free Software
27 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28 ##########################################################################
29
30 use strict;
31 use warnings;
32
33 # Check command line parameters
34 if ($#ARGV < 1) {
35 exit 1;
36 }
37
38 my @opts = @ARGV;
39 my $timeout = shift(@opts);
40 my $command = join(' ', @opts);
41 my $output = '';
42 my $ReturnCode = 0;
43
44 # Execute the command
45 eval {
46 local $SIG{ALRM} = sub { die "alarm\n" };
47 alarm $timeout;
48
49 $output = `$command`;
50 $ReturnCode = ($? >> 8) & 0xff;
51 alarm 0;
52 };
53
54 # Timeout
55 if ($@ eq "alarm\n") {
56 exit 3;
57 }
58
59 print $output;
60
61 exit $ReturnCode;
~