#1050: Bad permissions on authorized_keys after rewrite

This commit is contained in:
Unknwon 2015-03-14 22:37:23 -04:00
parent 86abd34eb8
commit 80b23854bc
3 changed files with 3 additions and 3 deletions

View file

@ -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
}