Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

On a server I haven't worked on, ntpd is broken:

# /etc/init.d/ntpd start
ntpd: error while loading shared libraries:
  libz.so.1: cannot open shared object file: Permission denied

but permissions look right:

# locate libz.so.1 | xargs ls -l
lrwxrwxrwx root root /usr/lib64/libz.so.1 -> libz.so.1.2.3
-rwxr-xr-x root root /usr/lib64/libz.so.1.2.3
lrwxrwxrwx root root /usr/lib/libz.so.1 -> libz.so.1.2.3
-rwxr-xr-x root root /usr/lib/libz.so.1.2.3
-rw-r--r-- root root /usr/lib/vmware-tools/lib32/libz.so.1/libz.so.1
-rw-r--r-- root root /usr/lib/vmware-tools/lib64/libz.so.1/libz.so.1
-rw-r--r-- root root /usr/lib/vmware-tools/lib32/libz.so.1
-rw-r--r-- root root /usr/lib/vmware-tools/lib64/libz.so.1

LD_LIBRARY_PATH is empty and the server is 64 bit:

# uname -a
Linux my.server 2.6.18-128.el5 #1 SMP [...] x86_64 x86_64 x86_64 GNU/Linux

Update:

# ldd /usr/sbin/ntpd
libz.so.1 => /usr/lib64/libz.so.1

and

# ls -l /usr/lib64/libz.so.1
lrwxrwxrwx root root /usr/lib64/libz.so.1 -> libz.so.1.2.3
# ls -l /usr/lib64/libz.so.1.2.3
-rwxr-xr-x root root /usr/lib64/libz.so.1.2.3
share|improve this question
    
What does ldd /usr/sbin/ntpd give? Also, are you running SELinux or similar? –  derobert Oct 31 '12 at 11:08
    
@derobert: I don't think it's a SELinux, but how to be sure? ldd looks right, I've updated the question. –  Philippe Blayo Oct 31 '12 at 12:53
    
Weird. What distribution is this exactly (some kind of RHEL5, but official or CentOS or other, and what version)? Please post the output of strace /usr/sbin/ntpd. If that doesn't fail, post the output of bash -x /etc/init.d/ntpd start. –  Gilles Oct 31 '12 at 22:13
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.