1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-21 12:44:49 -05:00

#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

@ -52,7 +52,7 @@ The goal of this project is to make the easiest, fastest, and most painless way
- Drone CI integration
- Supports MySQL, PostgreSQL and SQLite3
- Social account login (GitHub, Google, QQ, Weibo)
- Multi-language support ([10 languages](https://crowdin.com/project/gogs))
- Multi-language support ([11 languages](https://crowdin.com/project/gogs))
## System Requirements

View file

@ -39,7 +39,7 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自
- Drone CI 持续部署集成
- 支持 MySQL、PostgreSQL 以及 SQLite3 数据库
- 社交帐号登录GitHub、Google、QQ、微博
- 多语言支持([10 种语言]([more](https://crowdin.com/project/gogs))
- 多语言支持([11 种语言]([more](https://crowdin.com/project/gogs))
## 系统要求

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
}