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.

Tracking: Permission Errors when restoring and creating cache

See original GitHub issue

Issue

Files not created by the local user may fail when restored from the cache as tar preserves file permissions. Permission errors can also occur when the current user does not have permissions to read files when creating the cache. This is likely just a Linux and/or macOS issue (all the reports are Linux)

Reports

Possible solutions

  1. Run tar with sudo
    • What are the downsides of this approach?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:17
  • Comments:42 (8 by maintainers)

github_iconTop GitHub Comments

13reactions
bjorn3commented, Mar 14, 2020
lrwxrwxrwx 1 runner docker 22 Mar 13 15:33 /home/runner/.cargo -> /usr/share/rust/.cargo

~/.cargo is a symlink for /usr/share/rust/.cargo, so the chown only changed the owner of the symlink. Appending a / to the path (sudo chown -R $(whoami):$(id -ng) ~/.cargo/) does fix it without requiring a cache invalidation.

9reactions
bjorn3commented, Mar 13, 2020

I worked around this using sudo chown -R $(whoami):$(id -ng) ~/.cargo to make ~/.cargo owned by the current user.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Permission denied" while recovering cached files · Issue #9630
We have jobs failing in Alpakka project quite often because of the "Permission denied" error when recovering cached files.
Read more >
Pro Tools Error - Permission Denied (13) While Creating... We ...
The problem is that there are permission issues with the folder being used to create the cache and cloud project information, which means...
Read more >
Permission problems on cached files (#1782) - gitlab-runner
I've checked the status of the file after the initial build & they are all set to gitlab-runner so something that the cache...
Read more >
Tracking file permissions in Git. Error running git-cache-meta ...
Try this: function get_metadata { git ls-files | xargs stat -c $'%a\t%U\t%G\t%x\t%n' | while IFS=$'\t' read -r perm user grp date name; ...
Read more >
Refresh data caches on clients - Azure DevOps - Microsoft Learn
In either case, you must refresh the cache for tracking work items, and users must refresh the version control cache on client computers....
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