Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot change permissions of ‘/usr/local/bin’ since 2025-03-02 #249

Closed
v1v opened this issue Mar 6, 2025 · 11 comments
Closed

cannot change permissions of ‘/usr/local/bin’ since 2025-03-02 #249

v1v opened this issue Mar 6, 2025 · 11 comments

Comments

@v1v
Copy link
Contributor

v1v commented Mar 6, 2025

Start failing with

install: cannot change permissions of ‘/usr/local/bin’: Operation not permitted
Run sourcemeta/jsonschema@2470d6ca67dc844b7048ee285e96b7652723756a
Run curl --retry 5 --location --fail-early --silent --show-error \
---- Fetching the pre-built JSON Schema CLI binary from GitHub Releases
---- Fetching version v6.0.3 from https://github.com/sourcemeta/jsonschema/releases/download/v6.0.3/jsonschema-6.0.3-linux-x86_64.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 1503k  100 1503k    0     0  [9](https://github.com/elastic/app-obs-dev/actions/runs/13620147754/job/38293121826?pr=153#step:3:11)912k      0 --:--:-- --:--:-- --:--:-- 9912k
Archive:  /tmp/tmp.IjQ6a7AYO1/artifact.zip
   creating: /tmp/tmp.IjQ6a7AYO1/out/jsonschema-6.0.3-linux-x86_64/bin/
  inflating: /tmp/tmp.IjQ6a7AYO1/out/jsonschema-6.0.3-linux-x86_64/bin/jsonschema  
install: cannot change permissions of ‘/usr/local/bin’: Operation not permitted

and with even previous versions

Run sourcemeta/jsonschema@ea5fc1a889f6c4d404e6c48109c37aaf9248b5b1
Run curl --retry [5](https://github.com/elastic/ingest-dev/actions/runs/13693574903/job/38291107179?pr=5196#step:3:7) --location --fail-early --silent --show-error \
  curl --retry 5 --location --fail-early --silent --show-error \
    --output "${GITHUB_WORKSPACE}/install.sh" \
    "https://raw.githubusercontent.com/sourcemeta/jsonschema/main/install"
  chmod +x "${GITHUB_WORKSPACE}/install.sh"
  "${GITHUB_WORKSPACE}/install.sh" 5.0.1
  rm "${GITHUB_WORKSPACE}/install.sh"
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---- Fetching the pre-built JSON Schema CLI binary from GitHub Releases
---- Fetching version v5.0.1 from https://github.com/sourcemeta/jsonschema/releases/download/v5.0.1/jsonschema-5.0.1-linux-x8[6](https://github.com/elastic/ingest-dev/actions/runs/13693574903/job/38291107179?pr=5196#step:3:8)_64.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 1802k  100 1802k    0     0  3284k      0 --:--:-- --:--:-- --:--:-- 3284k
Archive:  /tmp/tmp.PxzPx[7](https://github.com/elastic/ingest-dev/actions/runs/13693574903/job/38291107179?pr=5196#step:3:9)kxyk/artifact.zip
   creating: /tmp/tmp.PxzPx7kxyk/out/jsonschema-5.0.1-linux-x[8](https://github.com/elastic/ingest-dev/actions/runs/13693574903/job/38291107179?pr=5196#step:3:10)6_64/include/
   creating: /tmp/tmp.PxzPx7kxyk/out/jsonschema-5.0.1-linux-x86_64/include/boost/
...
install: cannot change permissions of ‘/usr/local/bin’: Operation not permitted

It seems

jsonschema/install

Lines 33 to 34 in 1b9a5df

install -d -m 0755 "$OUTPUT/bin"
install -v -m 0755 "$TMP/out/jsonschema-$VERSION-$PACKAGE_PLATFORM_NAME-$ARCH/bin/jsonschema" "$OUTPUT/bin"

It worked fine 3 days ago:

  Image: ubuntu-24.04
  Version: 20250223.1.0
  Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20250223.1/images/ubuntu/Ubuntu2404-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20250223.1

But stopped working with the following runner version

  Image: ubuntu-24.04
  Version: 20250302.1.0
  Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20250302.1/images/ubuntu/Ubuntu2404-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20250302.1

See changes actions/runner-images@c414ecd

@v1v
Copy link
Contributor Author

v1v commented Mar 6, 2025

I also created actions/runner-images#11736

@v1v
Copy link
Contributor Author

v1v commented Mar 6, 2025

#250 is a potential fix so it uses the native support for GITHUB_PATH in GH actions

jviotti pushed a commit that referenced this issue Mar 6, 2025
Something has changed in the /usr/local/bin permission

However, GitHub actions can modify on the fly the PATH using the
GITHUB_PATH env variable as explained in
https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path


Part of #249
@jviotti
Copy link
Member

jviotti commented Mar 6, 2025

Hi @v1v , thanks a lot for catching this and for the quick fix! Let me do a CLI release

@jviotti
Copy link
Member

jviotti commented Mar 6, 2025

Released as v7.0.1: https://github.com/sourcemeta/jsonschema/releases/tag/v7.0.1. Thanks again!

@jviotti
Copy link
Member

jviotti commented Mar 6, 2025

I'll close it now, but please re-open if you find any other issues! 🙏🏻

@jviotti jviotti closed this as completed Mar 6, 2025
@daniel-white
Copy link

@jviotti for some reason the change didn't land in my path so im getting a different jsonschema binary

@jviotti
Copy link
Member

jviotti commented Mar 6, 2025

I wonder if we just need a sudo to get written permissions on /usr/local. Can you guys confirm sudo works and we don't actually need a password for it?

@jviotti
Copy link
Member

jviotti commented Mar 7, 2025

Can you try v7.0.2? Looks like this #251 worked!

@v1v
Copy link
Contributor Author

v1v commented Mar 7, 2025

Thanks @jviotti for your quick release and also the fix of the fix 🙏

@kleinschmidt
Copy link
Contributor

7.0.2 is working for us as well!

@jviotti
Copy link
Member

jviotti commented Mar 7, 2025

Any time, and thank you both for confirming and for the fixes! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants