Allow user process to use privileged ports

In this example we have a tomcat server running as user tomcat on Solaris or Linux. Both don’t allow a normal user to listen on ports lower than 1024.


# usermod -K defaultpriv=basic,net_privaddr tomcat

Linux: (replace <java_home> with your path to java)

# setcap cap_net_bind_service=+ep <java_home>/bin/java
# echo "<java_home>/jre/lib/amd64/jli" >> /etc/
# ldconfig