Skip to content

Instantly share code, notes, and snippets.

@ygini
Created September 8, 2016 09:58
Show Gist options
  • Save ygini/145a41371d25119fe250fc8db4f7dc02 to your computer and use it in GitHub Desktop.
Save ygini/145a41371d25119fe250fc8db4f7dc02 to your computer and use it in GitHub Desktop.
Allow a service not started as root to open ports below 1024

Allow java binary to open ports below 1024

setcap 'cap_net_bind_service=+ep' $(find /usr/lib/jvm -type f -name java)

Allow java to load third part so

dirname $(find /usr/lib/jvm -name libjli.so) > /etc/ld.so.conf.d/java.conf

Test java

java -version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment