I have an issue trying to setup an https on Google Cloud Platform using golang + let's encrypt
I already have a domain targeting the IP of the instance
Also I got a let's encrypt certificate and chain saved on /etc/letsencrypt/live/mydomain.com/
I already setup myapp to use the cert and configured to run as a service using myapp.service via systemctl
And after all this configurations I always get the next error message:
Feb 14 11:29:47 https https[1982]: 2019/02/14 11:29:47 listen tcp :443: bind: permission denied
Feb 14 11:29:47 https systemd[1]: https.service: Main process exited, code=exited, status=1/FAILURE
Feb 14 11:29:47 https systemd[1]: https.service: Unit entered failed state.
Feb 14 11:29:47 https systemd[1]: https.service: Failed with result 'exit-code'.
If you want to bind to a privileged port (ports less than 1024). You either need to be root
or have the CAP_NET_BIND_SERVICE
capability.
Ok, I just look for more info about CAP_NET_BIND_SERVICE and I found an answer of Scott Stensland inside this other post:
https://unix.stackexchange.com/questions/455221/setcap-not-found-in-debian-9/455234#455234
Now looks fixed ... thanks
But now I have a "open /etc/letsencrypt/live/mydomain.com/cert.pem: permission denied" error :\ (looking for other solutions in progress...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With