Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Yesterday, I have installed PERL 5.20.2 as root in
/usr/local/bin/perl-5.20.2
The libraries and modules have been correctly installed in
/usr/local/bin/perl-5.20.2/lib/
Directories of /usr/local/bin have to my view correct permission settings 755 and the modules have to my view correct permission settings 644.
I switched then the user to "daily_work" and tried to execute a PERL script which makes use of libraries and modules.
I obtained the error message "Permission denied" for all the libraries and modules used.
I tried then to add a line
use lib '/usr/local/bin/perl-5.20.2/lib' ;but the interpreter remained stubborn and wrote
lib.pm "Permission denied"
In the FileBrowser all libraries and modules were "locked" but there was no job visible with "top" which could have locked PERL modules. A system restart removing potential remainings of the "make install" didn't improve anything.
After a re-installation of PERL and some necessary modules from CPAN I tried to excute the same PERL script as root and the result was 100% correct and no error message appeared. Unfortunately, this does not mean anything on my LINUX machine - root is the king and has all permissions.
I tried then to print @INC in order to find out the paths to be checked for permissions:
for ($i=0; $i<scalar(@INC); ++$i) { print $INC[$i]."\n"; } print "end of vector INC \n\n";
The output was:
/root/localperl/lib/site_perl/5.20.2/x86_64-linux
/root/localperl/lib/site_perl/5.20.2
/root/localperl/lib/5.20.2/x86_64-linux
/root/localperl/lib/5.20.2
.
end of vector INC
In former versions of PERL there had been at least an @INC entry looking like
/usr/local/bin/perl-5.20.2/lib/
Now the questions are:
a) How can I (and most likely many other PERL programmers) fix that as normal users when lib.pm is "locked" by root's home?
b) How can I install PERL in such a way that all users have access to the libraries and modules?
With kind regards
mvi
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: LINUX PERL 5.20.2 libraries and modules: "Permission denied" for all users except root
by Anonymous Monk on Mar 01, 2015 at 21:41 UTC | |
|
Re: LINUX PERL 5.20.2 libraries and modules: "Permission denied" for all users except root
by kroach (Pilgrim) on Mar 01, 2015 at 22:53 UTC | |
by Anonymous Monk on Mar 02, 2015 at 19:32 UTC |