Skip to content

Commit ebda2a8

Browse files
committed
fix(perms): user-only settings file perms
Settings files contain auth tokens and should not be world-readable.
1 parent 8745328 commit ebda2a8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

settings/settings.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ func (s *Settings) Save(cf string) (string, error) {
9090
return "", err
9191
}
9292

93-
if err = os.MkdirAll(filepath.Join(FindHome(), "/.deis/"), 0775); err != nil {
93+
if err = os.MkdirAll(filepath.Join(FindHome(), "/.deis/"), 0700); err != nil {
9494
return "", err
9595
}
9696

9797
filename := locateSettingsFile(cf)
9898

99-
return filename, ioutil.WriteFile(filename, settingsContents, 0775)
99+
return filename, ioutil.WriteFile(filename, settingsContents, 0600)
100100
}
101101

102102
// Delete user's settings file.

0 commit comments

Comments
 (0)