Oracle Linux: How To Allow Non-Root Users To Bind To Port 80
Applies to:
Oracle Cloud Infrastructure - Version N/A to N/A [Release 1.0]
Linux OS - Version Oracle Linux 7.0 and later
Linux x86-64
Goal
To allow unprivileged users to bind to ports less than 1024
Solution
Port numbers below 1024 are reserved for superuser (root) so a normal OS users cannot bind to ports in this range.
In Linux, there are no user privileges available to grant non-root users to bind ports lower than 1024.
The feasible option would be to use Linux capabilities.
Program capabilities - CAP_NET_BIND_SERVICE can be set to a program to allow binding ports lower than 1024 by non-root user process.
Tagged:
0