systemd: add CapabilityBoundingSet settings in service file so that glider can listen on port below 1024 with none-root user

This commit is contained in:
nadoo committed 2017-08-24 11:58:32 +08:00
1 parent 4e4e778f1d
commit 1a941cd095
3 files changed
+17 -9

No files matched your search

+7
View File
@@ -6,7 +6,14 @@ After=network.target
Type=simple
User=nobody
Restart=always
# NOTE: change to your glider path
ExecStart=/usr/bin/glider -config /etc/glider/%i.conf
# work with systemd v229 or later, so glider can listen on port below 1024 with none-root user
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE
NoNewPrivileges=true
[Install]
WantedBy=multi-user.target