Commit c1ef3554 authored by Vijay Kumar Chauhan's avatar Vijay Kumar Chauhan
Browse files

Merge branch 'SG_ImmuDB' into 'coreimmudb'

changed Directory creation permission.

See merge request !263
parents 755e351b d6a73872
Branches
Tags
3 merge requests!270Core ImmuDB package and TOTP plugin - Implementation,!269Core ImmuDB package and TOTP plugin - Implementation,!263changed Directory creation permission.
Showing with 2 additions and 2 deletions
...@@ -95,7 +95,7 @@ func InitUsingJson(filePath string) error { ...@@ -95,7 +95,7 @@ func InitUsingJson(filePath string) error {
opts.Port = h.Port opts.Port = h.Port
if h.Dir != "" { if h.Dir != "" {
if _, err := os.Stat(h.Dir); os.IsNotExist(err) { // Checking directory is present and accessible if _, err := os.Stat(h.Dir); os.IsNotExist(err) { // Checking directory is present and accessible
if err = os.Mkdir(h.Dir, 0642); err != nil { if err = os.Mkdir(h.Dir, 0740); err != nil {
return err return err
} }
} }
...@@ -135,7 +135,7 @@ func InitImmuDBConnections(hosts []ImmuHost) error { ...@@ -135,7 +135,7 @@ func InitImmuDBConnections(hosts []ImmuHost) error {
opts.Port = v.Port opts.Port = v.Port
if v.Dir != "" { if v.Dir != "" {
if _, err := os.Stat(v.Dir); os.IsNotExist(err) { // Checking directory is present and accessible if _, err := os.Stat(v.Dir); os.IsNotExist(err) { // Checking directory is present and accessible
if err = os.Mkdir(v.Dir, 0642); err != nil { if err = os.Mkdir(v.Dir, 0740); err != nil {
return err return err
} }
} }
......
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