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

/usr/bin/tar: ../../../../home: Cannot mkdir: Permission denied #315

Closed
3 tasks
jvermillard opened this issue Apr 6, 2022 · 10 comments
Closed
3 tasks

/usr/bin/tar: ../../../../home: Cannot mkdir: Permission denied #315

jvermillard opened this issue Apr 6, 2022 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@jvermillard
Copy link

Description:

Run actions/setup-java@v[2](https://github.com/xxx/xxx/runs/5850864684?check_suite_focus=true#step:5:2)
  with:
    java-version: 17
    distribution: temurin
    cache: maven
    java-package: jdk
    architecture: x64
    check-latest: false
    server-id: github
    server-username: GITHUB_ACTOR
    server-password: GITHUB_TOKEN
    overwrite-settings: true
    job-status: success
Resolved Java 17.0.2+8 from tool-cache
Setting Java 17.0.2+8 as the default

Java configuration:
  Distribution: temurin
  Version: 17.0.2+8
  Path: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.2-8/x64

Creating settings.xml with server-id: github
Writing to /home/runner/.m2/settings.xml
Received 151889011 of 160277619 (94.8%), 144.9 MBs/sec
Received 160277619 of 160277619 (100.0%), 125.4 MBs/sec
Cache Size: ~15[3](https://github.com/xxxx/xxxx/runs/5850864684?check_suite_focus=true#step:5:3) MB (160277619 B)
/usr/bin/tar --use-compress-program zstd -d -xf /home/runner/work/_temp/39e2ec9[4](https://github.com/xxx/xxx/runs/5850864684?check_suite_focus=true#step:5:4)-1e[5](https://github.com/xxx/xxx/runs/5850864684?check_suite_focus=true#step:5:5)9-47a0-81cd-ff4e5b0[6](https://github.com/xxx/xxx/runs/5850864684?check_suite_focus=true#step:5:6)0e[7](https://github.com/xxx/xxx/runs/5850864684?check_suite_focus=true#step:5:7)d/cache.tzst -P -C /home/runner/work/xxx/xxx
/usr/bin/tar: ../../../../home: Cannot mkdir: Permission denied
/usr/bin/tar: ../../../../home/runner/.m2/repository: Cannot mkdir: No such file or directory
/usr/bin/tar: ../../../../home: Cannot mkdir: Permission denied
/usr/bin/tar: ../../../../home/runner/.m2/repository/org: Cannot mkdir: No such file or directory
/usr/bin/tar: ../../../../home: Cannot mkdir: Permission denied
/usr/bin/tar: ../../../../home/runner/.m2/repository/org/apache: Cannot mkdir: No such file or directory
/usr/bin/tar: ../../../../home: Cannot mkdir: Permission denied
/usr/bin/tar: ../../../../home/runner/.m2/repository/org/apache/maven: Cannot mkdir: No such file or directory
/usr/bin/tar: ../../../../home: Cannot mkdir: Permission denied
/usr/bin/tar: ../../../../home/runner/.m2/repository/org/apache/maven/plugins: Cannot mkdir: No such file or directory
/usr/bin/tar: ../../../../home: Cannot mkdir: Permission denied
/usr/bin/tar: ../../../../home/runner/.m2/repository/org/apache/maven/plugins/maven-enforcer-plugin: Cannot mkdir: No such file or directory

Task version:
Specify the task version

Platform:

  • [ X ] Ubuntu
  • macOS
  • Windows

Runner type:

  • [ X ] Hosted
  • Self-hosted

Repro steps:

use this workflow:

ame: 'validate'

on: [pull_request, workflow_dispatch]

jobs:
  validate:
    runs-on: ubuntu-latest
    timeout-minutes: 15

    steps:
      - name: Checkout Code
        uses: actions/checkout@v2

      - name: Set up JDK and maven cache
        uses: actions/setup-java@v2
        with:
          java-version: '17'
          distribution: 'temurin'
          cache: 'maven'
      - name: Build
        run: mvn -T 1C -e clean package -DskipTests

      - name: Unit tests
        run: mvn -T 1C -e test

Expected behavior:
Not failing at mkdir step

Actual behavior:
Early failure of the action

@jvermillard jvermillard added bug Something isn't working needs triage labels Apr 6, 2022
@dmitry-shibanov
Copy link
Contributor

Hello @jvermillard. Thank you for your report. We'll investigate the issue.

@dmitry-shibanov
Copy link
Contributor

Hello @jvermillard. Could you please provide link to the public repository. I've tried to reproduce the issue but everything works as expected.

@jvermillard
Copy link
Author

ok let me create an example

@dmitry-shibanov dmitry-shibanov self-assigned this Apr 8, 2022
@jvermillard
Copy link
Author

I tried with a brand new repository and I don't have the issue 🤔

So the context is I moved a provjet from a slef-hosted runner to the managed runners and I got this issue.

Do you think this would have caused the cache issue ?
Is there a way to me to change the default cache key ( setup-java-${{ platform }}-${{ packageManager }}-${{ fileHash }} ) to something else to see if it's not related to caching the private runner files?

@dmitry-shibanov
Copy link
Contributor

Hello @jvermillard. Thank you for your response. I think the faster way will be to change fileHash by editing pom.xml. Another solution is to wait a week with no builds while the cache will be cleared.

@dmitry-shibanov
Copy link
Contributor

Hello @jvermillard. Do you have any updates ?

@jvermillard
Copy link
Author

even if i change the pom.xml I still have:

Creating settings.xml with server-id: github
Writing to /home/runner/.m2/settings.xml
Received 0 of 160[27](https://github.com/xxx/xxx/runs/5972971393?check_suite_focus=true#step:5:27)7619 (0.0%), 0.0 MBs/sec
Received 75497472 of 160277619 (47.1%), 36.0 MBs/sec
Received 160277619 of 160277619 (100.0%), 49.7 MBs/sec
Cache Size: ~153 MB (160277619 B)
/usr/bin/tar --use-compress-program zstd -d -xf /home/runner/work/_temp/9f90a09a-[28](https://github.com/xxx/xxx/runs/5972971393?check_suite_focus=true#step:5:28)3f-4654-aa1f-fd5eff73eb4f/cache.tzst -P -C /home/runner/work/xxx/xxx
/usr/bin/tar: ../../../../home: Cannot mkdir: Permission denied
/usr/bin/tar: ../../../../home/runner/.m2/repository: Cannot mkdir: No such file or directory
/usr/bin/tar: ../../../../home: Cannot mkdir: Permission denied
/usr/bin/tar: ../../../../home/runner/.m2/repository/org: Cannot mkdir: No such file or directory
/usr/bin/tar: ../../../../home: Cannot mkdir: Permission denied

@dmitry-shibanov
Copy link
Contributor

Hello @jvermillard. Th setup-java action has restore-keys that is why it restores previous action after changing pom.xml. I think it was an internal issue with GitHub Actions itself, that is why It can be reproduced for different repository with new cache it works as expected.

For now I'm going to close the issue. If you have any concerns feel free to ping us.

@my3sons
Copy link

my3sons commented Oct 5, 2023

Hello @jvermillard, did you ever find a solution to the above? We are facing the exact same issue (albeit with actions/cache). We are creating the cache on self-hosted runner, but when we then try to access/restore that cache on a github hosted runner, it fails with the error below. However, we are always successful restoring that same cache at any time on the self-hosted runner.

/usr/bin/tar: ../../../../home: Cannot mkdir: Permission denied
/usr/bin/tar: ../../../../home/runner/.m2/repository: Cannot mkdir: No such file or directory
/usr/bin/tar: ../../../../home: Cannot mkdir: Permission denied
/usr/bin/tar: ../../../../home/runner/.m2/repository/org: Cannot mkdir: No such file or directory

Any feedback you have is greatly appreciated!

@jvermillard
Copy link
Author

@my3sons I don't really remeber, I think I deleted the cache and it did the trick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants