Using authbind

Using authbind as an alternative may be preferable to setting capabilities. authbind is a system utility that allows users without superuser privileges to access privileged network services, including binding to privileged ports:

hobnob@hobnob:$ sudo apt install authbind

In contrast to setting capabilities, authbind allows more fine-grained control with regard to the port and permissions it is granting. Configuration files for authbind can be found at /etc/authbind. In short, if a user has permission to access the /etc/authbind/byport/<port> file, then that user is able to bind to that port:

hobnob@hobnob:$ sudo touch /etc/authbind/byport/80hobnob@hobnob:$ sudo chown hobnob /etc/authbind/byport/80hobnob@hobnob:$ sudo chmod ...

Get Building Enterprise JavaScript Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.