it-novum / openitcockpit-agent-go

Cross-Platform Monitoring Agent for openITCOCKPIT written in Go
https://openitcockpit.io/download_agent/
Apache License 2.0
5 stars 2 forks source link

Wrong file permissions for TLS certs #44

Closed nook24 closed 3 years ago

nook24 commented 3 years ago

Error:

UNKNOWN: cURL error 58: could not load PEM client certificate, OpenSSL error error:0200100D:system library:fopen:Permission denied, (no key found, wrong pass phrase, or wrong file format?) (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

Current permissions:

root@agent-test2:/opt/openitc/frontend# ls -la /opt/openitc/agent/
total 16
drwxr-xr-x  2 www-data www-data 4096 Mär 18 13:25 .
drwxr-xr-x 12 root     root     4096 Mär 18 12:01 ..
-rw-r-----  1 www-data www-data 3272 Mär 18 13:25 server_ca.key
-rw-r-----  1 www-data www-data 2086 Mär 18 13:25 server_ca.pem

Fix:

chown www-data:nagios /opt/openitc/agent/*