panic: stat .: permission denied
Summary
When running sudo gitlab-runner commands, a error occurs
Steps to reproduce
- Have your home directory mounted over nfs with root_squash
- Run sudo gitlab-runner verify from your homedir.
Actual behavior
The following error occurs:
WARN[0000] Something went wrong creating config schema: stat .: permission denied
panic: stat .: permission denied
goroutine 1 [running]:
github.com/santhosh-tekuri/jsonschema/v5.MustCompileString({0x35e6c79, 0x9}, {0x373fc60, 0x1321})
github.com/santhosh-tekuri/jsonschema/v5@v5.3.1/compiler.go:80 +0x176
gitlab.com/gitlab-org/step-runner/schema/v1.init.0()
gitlab.com/gitlab-org/step-runner@v0.3.0/schema/v1/validate.go:21 +0x31
Expected behavior
Runners are verified ( or registered or whatever else).
Relevant logs and/or screenshots
WARN[0000] Something went wrong creating config schema: stat .: permission denied
panic: stat .: permission denied
Environment description
Rocky 9.5 system with user home directories mounted over nfs. Users login interactively to run register runners.
Used GitLab Runner version
gitlab-runner-17.8.3-1.x86_64
Possible fixes
In the same situation yum/dnf simply moves it's working directory:
[root@akun jhowe]# yum search gitlab
No read/execute access in current directory, moving to /
...
This behavior started with a recent update and has been working properly for many years.