Sample Header Ad - 728x90

How to get Oracle java 7 to work with setcap cap_net_bind_service+ep

12 votes
2 answers
18482 views
I am trying to grant the java executable the right to open ports below 1024 on Linux. Here is the setup - /home/test/java contains the Oracle Server JRE 7.0.25 - CentOS 6.4 Here is what getcap returns [test@centos6 java]$ pwd /home/test/java [test@centos6 java]$ getcap bin/java bin/java = cap_net_bind_service+ep [test@centos6 java]$ getcap jre/bin/java jre/bin/java = cap_net_bind_service+ep Trying to execute java gives the following error. [test@centos6 java]$ bin/java bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory [test@centos6 java]$ jre/bin/java jre/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory Is it possible to run Java 7_u25 when the binary has been given elevated privileges with setcap, if so how? JDK-6919633 : Runtime does not support POSIX File Capabilities (A.K.A. Linux Capabilities) says that Note: when using the setcap the libraries needed by the java launcher should be present in /usr/lib or any other "trusted" location that the runtime loader (rtld) uses to find shared libraries. How do I make the shared libraries trusted?
Asked by ams (1398 rep)
Aug 23, 2013, 08:46 PM
Last activity: Apr 13, 2023, 05:11 PM