Skip to content

Permissions errors on runners with Ruby preinstalled #624

@mhashizume

Description

@mhashizume

Ensure the following before filing this issue

  • I verified it reproduces with the latest version with - uses: ruby/setup-ruby@v1 (see Versioning policy)

  • I tried to reproduce the issue locally by following the workflow steps (including all commands done by ruby/setup-ruby, except for Downloading Ruby & Extracting Ruby),
    and it did not reproduce locally (if it does reproduce locally, it's not a ruby/setup-ruby issue)

Are you running on a GitHub-hosted runner or a self-hosted runner?

GitHub-hosted runner

Link to the failed workflow job (must be a public workflow job, so the necessary information is available)

https://github.com/puppetlabs/puppet-agent/actions/runs/9945835021/job/27475015085?pr=2548

Any other notes?

GitHub recently updated its Ubuntu 22.04 runner images to come preinstalled with Ruby 3.2. Since then, when attempting to install gems with Bundler after using the setup-ruby action to install Ruby 3.2, we get this error message:

The installation path is insecure. Bundler cannot continue.
/opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems is world-writable
(without sticky bit).
Bundler cannot safely replace gems in world-writeable directories due to
potential vulnerabilities.
Please change the permissions of this directory or choose a different install
path.
Error: Process completed with exit code 38.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions