Dropping Root Permissions In Python

前端 未结 6 2056
南旧
南旧 2020-12-02 15:36

I\'d like to have a Python program start listening on port 80, but after that execute without root permissions. Is there a way to drop root or to get port 80 without it?

6条回答
  •  旧时难觅i
    2020-12-02 16:07

    I recommend using authbind to start your Python program, so none of it has to run as root.

    https://en.wikipedia.org/wiki/Authbind

提交回复
热议问题