[erlang-questions] Is there a way to change the privileges of a working program?

Ferenc Holzhauser ferenc.holzhauser@REDACTED
Sun Jun 21 12:40:45 CEST 2009


Hi,

There seems to be an alternative on relatively new Linux kernels if you
don't want to do NAT, reverse proxy or running under root.

I've found this info below here:
http://stackoverflow.com/questions/277991/linux-how-to-run-a-server-on-port
-80-as-normal-user

========
It appears that Linux kernels since 2.6.24 have a new capability that allow
you to mark an executable (but not a script, of course) as having the "
CAP_NET_BIND_SERVICE" capability.
If you install the debian package "libcap2-bin", you can do that by issuing
the command

setcap 'cap_net_bind_service=+ep' /path/to/program

========
It works for me when I set it for the beam executable.

Ferenc


More information about the erlang-questions mailing list