summaryrefslogtreecommitdiffstats
path: root/models/publickey.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/publickey.go')
-rw-r--r--models/publickey.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/publickey.go b/models/publickey.go
index c8098748b2..f6cd5b4cbb 100644
--- a/models/publickey.go
+++ b/models/publickey.go
@@ -434,7 +434,7 @@ func RewriteAllPublicKeys() error {
defer sshOpLocker.Unlock()
tmpPath := filepath.Join(SSHPath, "authorized_keys.tmp")
- f, err := os.Create(tmpPath)
+ f, err := os.OpenFile(tmpPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600)
if err != nil {
return err
}