mirror of https://github.com/go-gitea/gitea.git
#1050: Bad permissions on authorized_keys after rewrite
This commit is contained in:
parent
86abd34eb8
commit
80b23854bc
|
@ -52,7 +52,7 @@ The goal of this project is to make the easiest, fastest, and most painless way
|
||||||
- Drone CI integration
|
- Drone CI integration
|
||||||
- Supports MySQL, PostgreSQL and SQLite3
|
- Supports MySQL, PostgreSQL and SQLite3
|
||||||
- Social account login (GitHub, Google, QQ, Weibo)
|
- 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
|
## System Requirements
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自
|
||||||
- Drone CI 持续部署集成
|
- Drone CI 持续部署集成
|
||||||
- 支持 MySQL、PostgreSQL 以及 SQLite3 数据库
|
- 支持 MySQL、PostgreSQL 以及 SQLite3 数据库
|
||||||
- 社交帐号登录(GitHub、Google、QQ、微博)
|
- 社交帐号登录(GitHub、Google、QQ、微博)
|
||||||
- 多语言支持([10 种语言]([more](https://crowdin.com/project/gogs)))
|
- 多语言支持([11 种语言]([more](https://crowdin.com/project/gogs)))
|
||||||
|
|
||||||
## 系统要求
|
## 系统要求
|
||||||
|
|
||||||
|
|
|
@ -434,7 +434,7 @@ func RewriteAllPublicKeys() error {
|
||||||
defer sshOpLocker.Unlock()
|
defer sshOpLocker.Unlock()
|
||||||
|
|
||||||
tmpPath := filepath.Join(SSHPath, "authorized_keys.tmp")
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue