我在 ubuntu 服务器上以普通用户身份登录,我需要在端口 80 上启动服务。到目前为止,它不允许我这样做,因为它是为管理员用户保留的。
但是我确实在另一台 ubuntu 服务器上看到了相同类型的用户,该用户已启动服务并使用端口 80。我想让当前用户设置为达到相同的行为,但我不知道该怎么办?我完全控制了这个 ubuntu 服务器。
这是我在该服务器上的服务当前状态:
systemctl -l status gns3.service
● gns3.service - GNS3 server
Loaded: loaded (/lib/systemd/system/gns3.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2022-03-23 16:57:07 UTC; 4s ago
Process: 78994 ExecStartPre=/bin/mkdir -p /var/log/gns3 /var/run/gns3 (code=exited, status=0/SUCCESS)
Process: 79003 ExecStartPre=/bin/chown -R gns3:gns3 /var/log/gns3 /var/run/gns3 (code=exited, status=0/SUCCESS)
Process: 79007 ExecStart=/usr/local/bin/gns3server --log /var/log/gns3/gns3.log (code=exited, status=1/FAILURE)
Main PID: 79007 (code=exited, status=1/FAILURE)
这是服务日志文件中的内容:
tail -10 /var/log/gns3/gns3.log
2022-03-23 17:13:13 INFO run.py:224 Config file /etc/gns3/gns3_server.conf loaded
2022-03-23 17:13:13 INFO run.py:243 Running with Python 3.8.10 and has PID 82762
2022-03-23 17:13:13 INFO run.py:79 Current locale is en_US.UTF-8
2022-03-23 17:13:13 INFO web_server.py:318 Starting server on 0.0.0.0:80
2022-03-23 17:13:13 INFO __init__.py:63 Load controller configuration file /etc/gns3/gns3_controller.conf
2022-03-23 17:13:13 INFO __init__.py:67 Controller is starting
2022-03-23 17:13:13 INFO compute.py:64 Create compute local
2022-03-23 17:13:13 INFO compute.py:364 Connecting to compute 'local'
2022-03-23 17:13:13 WARNING compute.py:367 Cannot connect to compute 'local': Cannot connect to host 127.0.0.1:80 ssl:default [Connect call failed ('127.0.0.1', 80)]
2022-03-23 17:13:13 CRITICAL web_server.py:88 Could not start the server: [Errno 13] error while attempting to bind on address ('0.0.0.0', 80): permission denied
该系统建立在 ubuntu 20.4 映像之上。