summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/publickey.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/models/publickey.go b/models/publickey.go
index 83a3e1b87e..f9880c74cd 100644
--- a/models/publickey.go
+++ b/models/publickey.go
@@ -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
}
}