Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


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


# 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

I have seen similar issue with one of my application and it was due to selinux in enforcing state. Change : /etc/selinux/config from SELINUX=enforcing ## or permissive to SELINUX=disabled

This should fix it. http://sysadminupdates.com/blog/2015/05/11/so-cannot-open-shared-object-file-permission-denied/

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.