How to use privileges port less than 1024 with non-root user

original url:

Using setcap command, for example, if you tomcat run with 80 with user tomcat

# setup the net bind program
setcap 'cap_net_bind_service=+epi' $JAVA_HOME/bin/java
# start tomcat
systemctl start tomcat
# check port
netstat -ant |grep 444
tcp        0      0   *               LISTEN

All done!

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay

Leave a Reply

Your email address will not be published. Required fields are marked *