in reply to perl script to run as non-root

dbashyam:

It sounds like either:

I'd start by checking perl --version in your account and the root account to see if they're the same or not. Then I'd try perl -e 'print join("\n",@INC)' on both accounts to see if there are any differences. Finally, I'd check the directory permissions on the path to .../DBD/Sybase.pm to see if you have permissions to access it.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^2: perl script to run as non-root
by dbashyam (Novice) on Oct 16, 2014 at 14:29 UTC
    Thanks for your replies, The only difference I find is when I run this command as "root' I get the below output perl -e 'print join("\n",@INC)' /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 While I run as non-root I get the below output: perl -e 'print join("\n",@INC)' /opt/nms/perl/lib /opt/nms/perl/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /opt/nms/perl/lib/perl5/site_perl/5.8.8 /opt/nms/perl/lib/perl5/site_perl /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 Actually there is no perl folder inside the /opt/nms/ but not sure how it is showing that. Will that be an issue? But apart from that I checked the permission of Sybase.pm and the path where the Sybase.pm is all seems to be fine. Thanks,

      Hi,

      and where have you found DBD/Sybase.pm?

      Is there any Sybase related environment variable for user root?

      McA

      dbashyam:

      Based on the path differences, I'd guess that you have a different perl. It seems that the system perl is using /usr/local/* and /usr/share/perl5/*, while the perl your account uses accesses /opt/nms/perl/*. Check with your system administrator to find out how to get access to the Sybase libraries (if they're installed), or how to change your path so that you can use the system perl (if that's allowed).

      By the way: it would've been a lot easier to look at if you put the output in code tags...

      ...roboticus

      When your only tool is a hammer, all problems look like your thumb.