mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 10:18:38 +00:00
#1050: Bad permissions on authorized_keys after rewrite
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user