question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Permission denied when caching `macports`

See original GitHub issue

Installing macports is a time-consuming part in my CI, so I guess backing up /opt/local will help:

- name: Cache MacPorts
  id: cache-macports
  uses: actions/cache@v2
  with:
    path: /opt/local/
    key: ${{ runner.os }}-macports-${{ hashFiles('macos_build.txt') }}

However, since #133 didn’t accept using sudo tar, I got a long error log all about permissons:

Run actions/cache@v2
Received 138412032 of 255723896 (54.1%), 132.0 MBs/sec
Received 255723896 of 255723896 (100.0%), 105.3 MBs/sec
Cache Size: ~244 MB (255723896 B)
/usr/local/bin/gtar --use-compress-program zstd -d -xf /Users/runner/work/_temp/68ab3e83-d089-4f96-b645-0834881ca4e5/cache.tzst -P -C /Users/runner/work/pacaptr/pacaptr --delay-directory-restore
/usr/local/bin/gtar: ../../../../../opt/local: Cannot mkdir: Permission denied
/usr/local/bin/gtar: ../../../../../opt/local: Cannot mkdir: Permission denied

Is it possible to introduce some sort of sudo, or is there any workaround?

Thanks in advance!

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
john-shaffercommented, May 6, 2022

Still needed

2reactions
john-shaffercommented, Oct 14, 2021

I’ve pushed a sudo branch which is available via: uses: john-shaffer/cache@sudo-tar

Read more comments on GitHub >

github_iconTop Results From Across the Web

couldn't create cache file (errno=Permission denied)
This doesn't sound like a gmp- or MacPorts-specific problem, but rather a permissions problem with a central OS-provided directory. I would expect you...
Read more >
36298 (HandBrake: mkdir: /usr/X11/var: Permission ... - MacPorts Trac
Building HandBrake on my OS X Mountain Lion 10.8.2 system with Xcode 4.5 fails with:
Read more >
permission denied errors during building with clang on ... - MacPorts
permission denied errors during building with clang on Mavericks ... to be a problem with permissions on the cache directory mentioned in the...
Read more >
permission denied error when installing geany - MacPorts Trac
sudo port clean geany and try again. If that doesn't work, manually delete /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.
Read more >
NPM doesn't install packages in the appropriate location
Keywords: Cc: ryandesignmacports.org ... 304 https://registry.npmjs.org/pubnub npm ERR! error installing pubnub@3.1.6 ... Error: EACCES, permission denied ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found