Browse Source

fix permission mkdir snapshot

avoid open file operation not permitted
pull/2831/head
Konstantin Lebedev 3 years ago
parent
commit
84b7b83517
  1. 2
      weed/server/raft_server.go

2
weed/server/raft_server.go

@ -86,7 +86,7 @@ func NewRaftServer(option *RaftServerOption) (*RaftServer, error) {
os.RemoveAll(path.Join(s.dataDir, "conf")) os.RemoveAll(path.Join(s.dataDir, "conf"))
os.RemoveAll(path.Join(s.dataDir, "snapshot")) 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 return nil, err
} }

Loading…
Cancel
Save