When accessing ec2-user directory it shows ‘Permission Denied’ using gitlab runner.
stages:
- build
pull-repository-job:
stage: build
tags:
- ci
- shell
only:
- master
before_script:
- cd /home/ec2-user/deployer/safety/httpdocs
script:
- echo "Start Deploy"
- echo "Finished Build and Deploy"
When accessing the gitlab-runner directory there will be no error shown.
Here is the error message:
Running with gitlab-runner 17.1.0 (fe45d)
on Gitlab Runner for safety 4zsL7mu-, system ID: s_ec27s2f
Preparing the "shell" executor
00:00
Using Shell (bash) executor...
Preparing environment
00:00
Running on ip-10-10-132-216.us-west-2.compute.internal...
Getting source from Git repository
00:00
mkdir: cannot create directory ‘/home/ec2-user’: Permission denied