Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Permission questionΒ #4

@ghost

Description

I am using this action in an upstream workflow that triggers a downstream workflow. It seems to work fine, except that the permissions of the file downloaded from the S3 bucket appear to be incorrect. A listing of my workspace files looks like this:

Run ls -lR
.:
total 16
-rw-r--r-- 1 runner docker  101 Jul 15 15:11 README.md
drwxr-xr-x 2 runner docker 4096 Jul 15 15:11 artifacts
-rwxr-xr-x 1 runner docker  310 Jul 15 15:11 stage1.sh
-rwxr-xr-x 1 runner docker   97 Jul 15 15:11 stage2.sh

./artifacts:
total 6892
-rw-r--r-- 1 root root 7054295 Jul 15 15:10 stage1.art

The step that gets the file from S3 looks like this:

      # Get the artifacts from the upstream workflow.
      - name: Get artifacts from upstream workflow
        uses: prewk/s3-cp-action@v2
        with:
          aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          aws_region: 'us-west-2'
          source: 's3://stage1-artifacts'
          dest: 'artifacts'
          flags: --recursive

This causes a problem for my further downstream processing, as it appears to be running as runner:docker and hence the artifact file is read-only. Is there some flag or option that would result in the downloaded artifact being owned by runner rather than root?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions