1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-23 17:14:27 +00:00

Mirror fix on #352

This commit is contained in:
Unknwon 2014-08-07 06:45:29 -04:00
parent e527c9b330
commit 9d5c0c80a4

View File

@ -161,9 +161,8 @@ func saveAuthorizedKeyFile(key *PublicKey) error {
return err
}
if finfo.Mode().Perm() > 0600 {
log.Error(3, "authorized_keys file has unusual permission flags: %s - setting to -rw-------", finfo.Mode().Perm().String())
err = f.Chmod(0600)
if err != nil {
log.Error(4, "authorized_keys file has unusual permission flags: %s - setting to -rw-------", finfo.Mode().Perm().String())
if err = f.Chmod(0600); err != nil {
return err
}
}