#1050: Bad permissions on authorized_keys after rewrite
This commit is contained in:
parent
86abd34eb8
commit
80b23854bc
3 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue