Server-side hooks not firing in the self-managed gitlab-ee core

i’m trying to understand if fact that the server-side hooks are not fired is due to limitation of the free licensing tier, fact that i do something wrong or a bug.

i have gitlab-ee 12.7.5, with repository called testproj0, files for it are kept in “/var/opt/gitlab/git-data/repositories/@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.git”. under /var/opt/gitlab/git-data/repositories/@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.git/hooks i have created three files: pre-commit, pre-push, pre-receive, each with the same content:

echo >&2 ‘testing’
exit 1

all have +x bit set and are executable by the local user git

i would expect any attempt to push to this repository to fail with something like:
" ! [remote rejected] master -> master (pre-receive hook declined)"

yet looks like the hooks are not executed at all and all pushes succeed despite of them.

thanks in advance for your help!

i’ll answer myself - this worked for me in 12.7.5-ee.0:

executable file /opt/gitlab/embedded/service/gitlab-shell/hooks/pre-receive.d/hook

in /etc/gitlab/gitlab.rb - uncommented: gitlab_shell[‘custom_hooks_dir’] = “/opt/gitlab/embedded/service/gitlab-shell/hooks”

per project hooks started to work when i’ve placed them under /var/opt/gitlab/git-data/repositories/@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.git/custom_hooks/