Permission denied when using Amazon S3 Cache
I installed the GitLab CI Runner on an Amazon EC2 Instance. I registered the new Runner and it worked well. But when I configure the Runner to use an Amazon S3 Bucket for cache-storage, the tasks will fail.
I configured a task with caching some files. At the start of this task, I get the error message "[cache-directory]/cache.zip: permission denied". After checking the folder, I noticed that the cache-Folder (/home/gitlab-runner/cache/) got the permission 600. So the gitlab user could not access the folder. Even when I delete that folder, the cache folder will be newly created with the same permissions on the next build. When I remove the "runners.cache"-section, the cache-folder get created with correct permissions.
I checked the connection to the S3 Bucket via s3cmd and it worked well.
My runners configuration:
concurrent = 1
check_interval = 10
[[runners]]
name = "my runner"
limit = 1
url = "https://gitlab.com/ci"
token = "MY_TOKEN"
executor = "shell"
shell = "bash"
[runners.ssh]
[runners.docker]
tls_verify = false
image = ""
privileged = false
disable_cache = false
[runners.parallels]
base_name = ""
disable_snapshots = false
[runners.virtualbox]
base_name = ""
disable_snapshots = false
[runners.cache]
Type = "s3"
ServerAddress = "s3.amazonaws.com"
AccessKey = "MY_ACCESS_KEY"
SecretKey = "MY_SECRET_KEY"
BucketName = "MY_BUCKET_NAME"
BucketLocation = "eu-central-1"
Insecure = false
My system: Ubuntu 14.04 on Amazon EC2 Instance Gitlab-ci-multi-runer version 1.5.3 (fb49c47)
I installed the runner by following this doc https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-repository.md