fix permission mkdir snapshot

avoid open file operation not permitted
This commit is contained in:
Konstantin Lebedev 2022-03-28 18:41:52 +05:00
parent 93615b2a49
commit 84b7b83517

View file

@ -86,7 +86,7 @@ func NewRaftServer(option *RaftServerOption) (*RaftServer, error) {
os.RemoveAll(path.Join(s.dataDir, "conf"))
os.RemoveAll(path.Join(s.dataDir, "snapshot"))
}
if err := os.MkdirAll(path.Join(s.dataDir, "snapshot"), 0600); err != nil {
if err := os.MkdirAll(path.Join(s.dataDir, "snapshot"), 0700); err != nil {
return nil, err
}