Page 1 of 1

Perl Module Permissions

Posted: Tue Feb 22, 2022 1:37 pm
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

Re: Perl Module Permissions

Posted: Wed Feb 23, 2022 12:58 pm
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

Re: Perl Module Permissions

Posted: Thu Feb 24, 2022 8:58 am
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

Re: Perl Module Permissions

Posted: Thu Feb 24, 2022 4:11 pm
by pbroste
Hello @ksafa

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