Set strict permissions on the config file

This commit is contained in:
Nick Craig-Wood 2014-03-16 13:53:51 +00:00
parent 2e5f0ef258
commit 1ea9972be7
1 changed files with 4 additions and 0 deletions

View File

@ -91,6 +91,10 @@ func SaveConfig() {
if err != nil {
log.Fatalf("Failed to save config file: %v", err)
}
err = os.Chmod(ConfigPath, 0600)
if err != nil {
log.Printf("Failed to set permissions on config file: %v", err)
}
}
// Show an overview of the config file