Closed
Description
- Gitea version (or commit ref): 1.10.0
- Git version:
2.22.0 - Operating system: docker
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Not relevant
- Log gist: No relevant log entries
Description
When the pre-receive, update and post-receive hooks have lost their executable permission (due to reasons not directly relevant to the actual bug), they should be automatically recreated with +x permission (see
Lines 1114 to 1150 in dfd8b94
However, it turns out that this is not the case, apparently because ioutil.WriteFile does not change permissions on existing files.
Proposed solution by Zeripath: just need to call os.Chmod afterwards