File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ import (
28
28
const (
29
29
// Name prefix for the temporary files.
30
30
tmpPrefix = "."
31
+
32
+ // The default permission bits to set on the filestore directory.
33
+ directoryPerm = 0700
31
34
)
32
35
33
36
// FileStore is an implementation of the Store interface which stores data in files.
@@ -41,7 +44,7 @@ type FileStore struct {
41
44
42
45
// NewFileStore returns an instance of FileStore.
43
46
func NewFileStore (path string , fs utilfs.Filesystem ) (Store , error ) {
44
- if err := fs .MkdirAll (path , 0755 ); err != nil {
47
+ if err := fs .MkdirAll (path , directoryPerm ); err != nil {
45
48
return nil , err
46
49
}
47
50
return & FileStore {directoryPath : path , filesystem : fs }, nil
@@ -52,7 +55,7 @@ func (f *FileStore) Write(key string, data []byte) error {
52
55
if err := ValidateKey (key ); err != nil {
53
56
return err
54
57
}
55
- if err := f .filesystem .MkdirAll (f .directoryPath , 0755 ); err != nil {
58
+ if err := f .filesystem .MkdirAll (f .directoryPath , directoryPerm ); err != nil {
56
59
return err
57
60
}
58
61
You can’t perform that action at this time.
0 commit comments