I'm trying to deploy base build using gitlab-runner. Each build i have the same error mkdir: cannot create directory ‘/var/www/test_deploy’: Permission denied. I've added gitlab-runner user for all possible user groups but it hasn't helped. I'm using CentOS 7. Could someone help me to solve this issue or just steer me the right way?
Here is my config.toml:
concurrent = 1
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "Runner"
url = "https:/link to gitlab"
token = "token"
executor = "shell"
builds_dir = "/var/www/test_deploy/"
[runners.custom_build_dir]
enabled = true
[runners.docker]
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
and here is gitlab-runner user groups:
root:x:0:gitlab-runner
wheel:x:10:gitlab-runner
tape:x:30:gitlab-runner
gitlab-runner:x:5008:
docker:x:982:gitlab-runner
The problem was directory owner. After owner changing (for /var/www/) it works fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With