lindenstaub / caddy-install.sh

A script to automatically install caddy and it's init script
0 stars 1 forks source link

listen tcp :80: bind: permission denied #3

Open lindenstaub opened 6 years ago

lindenstaub commented 6 years ago

setcap CAP_NET_BIND_SERVICE=+eip /path/to/caddy didn't help, although

# getcap /usr/local/bin/caddy
/usr/local/bin/caddy = cap_net_bind_service+ep

Running caddy as root doesn't get this error.

Solution: Uncomment in the /etc/systemd/system/caddy.service file

    ;CapabilityBoundingSet=CAP_NET_BIND_SERVICE
    ;AmbientCapabilities=CAP_NET_BIND_SERVICE
    ;NoNewPrivileges=true
hypervtechnics commented 5 years ago

Uncomment with cap enabled or not?