Perl Module Permissions

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ksafa
Posts: 91
Joined: Wed Jan 15, 2014 3:05 pm

Perl Module Permissions

Post by ksafa »

Not sure what happened but doing some stuff with CPAN and now it appears all my perl service checks are failing. Seeing the following error:

Can't locate strict.pm: /usr/local/lib64/perl5/strict.pm: Permission denied at ./check_snmp_process_wizard.pl line 15.
BEGIN failed--compilation aborted at ./check_snmp_process_wizard.pl line 15.

The same checks do work when run as root user. So, thinking some sort of permission got modified somehow. I do see module when i run cpan -l as root.

Thanks
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Perl Module Permissions

Post by pbroste »

Hello @ksafa

Thanks for reaching out, want to verify that we are receiving expected results with the very basic:

Code: Select all

perl -MPod::Usage -E 'say "hello world"'
Let's start off by running through script to verify permissions:

Code: Select all

/usr/local/nagiosxi/scripts/reconfigure_nagios.sh
Also install the latest updates:
  • Admin => System Extensions / Manage Components => [Check for updates] ==> [Install Updates]
Get the following for further troubleshooting:

Code: Select all

yum list installed | grep -i perl > /tmp/yumlist.txt && rpm -qa | grep perl >> /tmp/yumlist.txt
In your statement you pointed out that "...doing some stuff with CPAN.."; that is pretty open to interpretation and provide the option to run through perl -MCPAN -e 'install Nagios::Plugin' and let us know the results.

Please let us know how things look.

Thanks,
Perry
ksafa
Posts: 91
Joined: Wed Jan 15, 2014 3:05 pm

Re: Perl Module Permissions

Post by ksafa »

I ended up running chmod -R go+rX on the paths below:

/usr/local/lib64/perl5
/usr/lcoal/share/perl5
/usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl
/usr/lib64/perl5
/usr/share/perl5

Things started working now. Should i be ok then? Anything I can check to be sure nothing else may be still impacted?

Thanks
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Perl Module Permissions

Post by pbroste »

Hello @ksafa

Excellent, looks good. Let us know if you need anything further,
Perry
Locked