Files
gitea-MIRROR/cmd
Mitrahsoft 563d8ecba5 fix(ssh): create host key directory with 0700 permissions (#40517)
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>
2026-11-26 01:57:38 +00:00
..