Commit cd1afadc authored by kpcyrd's avatar kpcyrd Committed by GitHub

Fix permissions

0777 leaves the directory writable for all local users.

License: MIT
Signed-off-by: kpcyrd git@rxv.cc
parent 5274262c
...@@ -47,7 +47,7 @@ var ( ...@@ -47,7 +47,7 @@ var (
func Create(path string, fun *ShardIdV1) error { func Create(path string, fun *ShardIdV1) error {
err := os.Mkdir(path, 0777) err := os.Mkdir(path, 0755)
if err != nil && !os.IsExist(err) { if err != nil && !os.IsExist(err) {
return err return err
} }
...@@ -148,7 +148,7 @@ func (fs *Datastore) makeDir(dir string) error { ...@@ -148,7 +148,7 @@ func (fs *Datastore) makeDir(dir string) error {
} }
func (fs *Datastore) makeDirNoSync(dir string) error { func (fs *Datastore) makeDirNoSync(dir string) error {
if err := os.Mkdir(dir, 0777); err != nil { if err := os.Mkdir(dir, 0755); err != nil {
// EEXIST is safe to ignore here, that just means the prefix // EEXIST is safe to ignore here, that just means the prefix
// directory already existed. // directory already existed.
if !os.IsExist(err) { if !os.IsExist(err) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment