in reply to Re: DBD::ODBC works as root but not as non-root user
in thread DBD::ODBC works as root but not as non-root user

ODBC.so has global r and x privs - so why would this be an issue?
  • Comment on Re^2: DBD::ODBC works as root but not as non-root user

Replies are listed 'Best First'.
Re^3: DBD::ODBC works as root but not as non-root user
by Anonymous Monk on Jul 09, 2010 at 06:25 UTC
    ODBC.so has global r and x privs - so why would this be an issue?

    Um, what? ...ODBC.so' for module DBD::ODBC: libodbc.so.1: cannot open shared object file

    Compare your %ENV to roots %ENV, and you'll notice differences in LD_LIBRARY_PATH ... ldd ODBC.so

      I'm not sure LD_LIBRARY_PATH has anything to do with the direct loading of ODBC.so as the full path to it will be specified when the DynaLoader attempts to load it. More likely is that ODBC.so depends on something else that the dynamic linker cannot find. Try running ldd on /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so as root and non root users to look for a difference. You may need to add a path to say unixODBC libs etc to your dynamic linker configuration - see man ld.so. For example, on my machine:

      $ ldd /usr/local/lib/perl/5.10.0/auto/DBD/ODBC/ODBC.so linux-gate.so.1 => (0x00694000) libodbc.so.1 => /usr/lib/libodbc.so.1 (0x00a87000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x00223000) libltdl.so.7 => /usr/lib/libltdl.so.7 (0x003ad000) libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x00f3e000) /lib/ld-linux.so.2 (0x00d18000) libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x00567000)

      One last thing to check is whether you are running SELinux.