Skip to main content
The 2024 Developer Survey results are live! See the results

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 1
    What your proposing isn't considered best practice. You might look at inetd, which can listen on a privileged socket and then hand that socket of to an unprivileged program. Commented Feb 2, 2014 at 9:59
  • Probably good advice if you are designing the program. If you just want to run a program that accepts a port as an argument, what would you do then?
    – jontejj
    Commented Jan 21, 2021 at 21:34
  • @jontejj Just to make sure I'm clear, you're talking about a program that accepts a port number to listen on via the command line? I'd start by seeing if there was any way to use a non privileged port, to avoid needing root privs. There might be a way to use linux capability tools to assign just the right to open privilege ports when you run the program. Commented Jan 22, 2021 at 3:55
  • auth-bind seem to be the way to go for one-offs?
    – jontejj
    Commented Jan 22, 2021 at 5:34
  • @jontejj I'm not familiar with it so I can't say. Commented Jan 22, 2021 at 7:27