From 1351a73e8f7732ab9765aa90619b5246cc456c55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Wed, 1 May 2019 00:28:37 -0700 Subject: [PATCH] Fix haproxy.cfg permissions --- pkg/controller/controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index afff0b7f2..ff004e6f7 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -369,7 +369,7 @@ func (hc *HAProxyController) OnUpdate(cfg ingress.Configuration) error { } func (hc *HAProxyController) writeModSecConfigFile(data []byte) error { - if err := ioutil.WriteFile(hc.modsecConfigFile, data, 644); err != nil { + if err := ioutil.WriteFile(hc.modsecConfigFile, data, 0644); err != nil { glog.Warningf("Error writing modsecurity config file: %v", err) return err } @@ -387,7 +387,7 @@ func (hc *HAProxyController) rewriteConfigFiles(data []byte) (string, error) { configFile := hc.configDir + "/" + hc.configFilePrefix + timestamp + hc.configFileSuffix // Write directly to configFile - if err := ioutil.WriteFile(configFile, data, 644); err != nil { + if err := ioutil.WriteFile(configFile, data, 0644); err != nil { glog.Warningf("Error writing haproxy config file: %v", err) return "", err }