From 1ea9972be796f87a9fa8dd06ada22bccf92ab3fe Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sun, 16 Mar 2014 13:53:51 +0000 Subject: [PATCH] Set strict permissions on the config file --- fs/config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/config.go b/fs/config.go index f298931a4..6321601be 100644 --- a/fs/config.go +++ b/fs/config.go @@ -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