Use authbind on Linux to serve copyparty on port 80 and 443 without root.
- 主要语言
- Python
- 星标
- 46.6k
- 派生
- 1.9k
- 平均合并
- 10 天 16 小时
- 30 天内合并 PR
- 5
描述
Hi,
I just wanted to share that it is possible to serve `copyparty` on port 80 and 443 without root privileges using [authbind](https://en.wikipedia.org/wiki/Authbind) like this:
`authbind --deep python copyparty-sfx.py -p 80,443`
`authbind` will run the program as the current user, but allow `copyparty` to serve on port 80 and 443.
Still, you need to setup some "permissions files" to tell authbind to allow users on your computer to run `authbind` to serve on those ports. This can be simply done for all users on your Linux by running
```
sudo touch /etc/authbind/byport/80
sudo touch /etc/authbind/byport/443
sudo chmod 777 /etc/authbind/byport/80
sudo chmod 777 /etc/authbind/byport/443
```
which will create these two files 80 and 443 and set the permission-bits that tells that all users on your Linux computer can run authbind to serve anything on port 80 and 443. See [man](https://manpages.ubuntu.com/manpages/xenial/man1/authbind.1.html) on how this works.
I think this is one of the easiest way to make a program serve on "privileged ports below 1024" on Linux. Maybe you can add this to the `README.md` to give people yet another option to run `copyparty` on port 80 and 443 on Linux? Or maybe detect that `authbind` is installed and then run it using it for an out of the box experience?
Anyways, thanks for this wonderful program. It is very useful for serving files on LANs.
贡献指南
评估
这个 Issue 还没有评估数据。