Skip to content

Commit

Permalink
Fix haproxy.cfg permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
abh authored and jcmoraisjr committed Dec 11, 2019
1 parent 362a776 commit 1351a73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit 1351a73

Please sign in to comment.