Telefonica / puppet-github-actions-runner

In This Repository you can find a module that will setup all of the files and configuration needed for GitHub Actions runner to work on Linux hosts (Ubuntu, Debian and CentOS).
Apache License 2.0
12 stars 15 forks source link

Fix non-root run permissions #7

Closed joelgarboden closed 3 years ago

joelgarboden commented 4 years ago

Without this, non-root user or group results in a mix of permissions.

ll /mnt/ghe_actions-2.272.0/DevOps/
total 80
drwxr-xr-x 5   1001 docker  4096 Dec  3 23:40 ./
drwxr-xr-x 3 ubuntu ubuntu  4096 Dec  3 23:40 ../
-rw-r--r-- 1 root   root     225 Dec  3 23:40 .credentials
-rw------- 1 root   root    1667 Dec  3 23:40 .credentials_rsaparams
-rw-r--r-- 1 root   root      13 Dec  3 23:40 .env
-rw-r--r-- 1 root   root     139 Dec  3 23:40 .path
-rw-r--r-- 1 root   root     317 Dec  3 23:40 .runner
drwxr-xr-x 2 root   root    4096 Dec  3 23:40 _diag/
drwxr-xr-x 3   1001 docker 16384 Jul 29 19:35 bin/
-rwxr-xr-x 1   1001 docker  2673 Jul 29 19:33 config.sh*
-rwxr-xr-x 1 ubuntu ubuntu  1237 Dec  3 23:40 configure_install_runner.sh*
-rwxr-xr-x 1   1001 docker   623 Jul 29 19:33 env.sh*
drwxr-xr-x 4   1001 docker  4096 Jul 29 19:34 externals/
-rwxr-xr-x 1   1001 docker  1666 Jul 29 19:33 run.sh*
-rwxr-xr-x 1 root   root     513 Dec  3 23:40 runsvc.sh*
-rwxr-xr-x 1 root   root    4650 Dec  3 23:40 svc.sh*
mrodm commented 3 years ago

Hi @joelgarboden ! Thanks for this pull request, we're looking forward for merging it, would you mind rebasing and adding some simple test for the archive resource ?

ShimonOhayon commented 3 years ago

Hi @joelgarboden , After testing this changes, it seems not to solve the issue. The ownership and group of the files in the tarball are are preserve from the tar creation.

It's needed to add an Exec to the manifest to override those permissions. Thank for brining it to our attention. we will solve it ASAP. #10

joelgarboden commented 3 years ago

Awesome, thanks. Apologies I wasn't able to loop back around to this yet.