Skip to content

Commit c1fb103

Browse files
authored
Use mode 0700 for the config dir, not 0755; other users should not have access to the config (#1210)
1 parent bfa07bd commit c1fb103

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/persister.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func (p FilePersister) Save(v *viper.Viper, basename string) error {
2525
v.SetConfigName(basename)
2626

2727
if _, err := os.Stat(p.Dir); os.IsNotExist(err) {
28-
if err := os.MkdirAll(p.Dir, os.FileMode(0755)); err != nil {
28+
if err := os.MkdirAll(p.Dir, os.FileMode(0700)); err != nil {
2929
return err
3030
}
3131
}

0 commit comments

Comments
 (0)