Merge pull request #12369 from hashicorp/b-peers-perms
core: write peers.json file with correct permissions
This commit is contained in:
commit
65c950baf4
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
Write peers.json file with correct permissions
|
||||
```
|
|
@ -1330,7 +1330,7 @@ func (s *Server) setupRaft() error {
|
|||
peersFile := filepath.Join(path, "peers.json")
|
||||
peersInfoFile := filepath.Join(path, "peers.info")
|
||||
if _, err := os.Stat(peersInfoFile); os.IsNotExist(err) {
|
||||
if err := ioutil.WriteFile(peersInfoFile, []byte(peersInfoContent), 0755); err != nil {
|
||||
if err := ioutil.WriteFile(peersInfoFile, []byte(peersInfoContent), 0644); err != nil {
|
||||
return fmt.Errorf("failed to write peers.info file: %v", err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue