Skip to content

Bind to ports 1-1024 without the needing root privileges #

Used for running applications that binds to ports 1-1024 (i.e. HTTP & HTTPS ports) as a non-privileged user

Make sure to change

  • /path/to/program
1
2
sudo apt-get install libcap2-bin 
sudo setcap 'cap_net_bind_service=+ep' /path/to/program
  • If you encounter an error such as the one below, then you can try authbind
1
The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file

Last update: January 22, 2021