mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-27 22:07:33 +08:00
The built-in SSH server created a missing host key directory with `os.ModePerm`, leaving it readable by all users. `gitea generate ssh host-keys` created it with 0644, which lacks the execute bit, so the keys could not be written into it. `InitDefaultHostKeys` now creates the directory, including missing parents, with 0700 for both callers. Existing directories keep their permissions. Fixes: https://github.com/go-gitea/gitea/issues/33533 Assisted-by: Claude Code:claude-opus-5-5 --------- Co-authored-by: silverwind <me@silverwind.io>