Warning: EACCES: permission denied, lstat '/var/lib/docker/image'
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.6k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
I want to cache the pulled docker images. This is the YAML file I wrote:
- name: Change Docker image directory ownership
run: sudo chown -R $USER:$USER /var/lib/docker/image
- name: Cache Docker
uses: actions/cache@v4
with:
path: |
/var/lib/docker/image
key: docker-layers-${{ runner.os }}-pull-image
- name: Pull images
run: |
docker pull holism/panel
docker pull node:lts-bookworm-slim
The problem is that the Post step for Cache Docker can not access the /var/lib/docker/image directory:
Post job cleanup.
Warning: EACCES: permission denied, lstat '/var/lib/docker/image'
I even tried to make it world-writable and executable by using run: sudo chmod -R 777 --preserve-root /var/lib/docker/image, yet I still get that error.
I think it's a bug of your action that does not perform the chmod or can not perform it on the target directory. Therefore I reported it.
I have also seen https://github.com/actions/cache/issues/81 and https://github.com/actions/cache/issues/31.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the workflow shown in the issue with actions/cache@v4, focusing on the Post cleanup step and its access to /var/lib/docker/image. Read the referenced cache issues 81 and 31 for related behavior. Done means establishing whether the action can support this path and resolving or clearly documenting the EACCES failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, github-actions, typescript
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100