mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
Merge pull request #12369 from hashicorp/b-peers-perms
core: write peers.json file with correct permissions
This commit is contained in:
3
.changelog/12369.txt
Normal file
3
.changelog/12369.txt
Normal file
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user