cache
cache copied to clipboard
Cannot mknod: Operation not permitted
I ran into this issue trying to cache LXD containers. I had to change some file permissions because actions/cache was failing due to permission denied. Now, saving the cache works, but when I try to restore it, I get:
/usr/bin/tar -xf /opt/actions-runner/_work/_temp/f9c60f6d-08e1-489e-9f92-01f605b0ad76/cache.tzst -P -C /opt/actions-runner/_work/juju/juju --use-compress-program unzstd
/usr/bin/tar: ../../../../../var/snap/lxd/common/lxd/storage-pools/default/containers/snapcraft-juju/rootfs/dev/ptmx: Cannot mknod: Operation not permitted
...
/usr/bin/tar: Exiting with failure status due to previous errors
Warning: Failed to restore: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2
Full job logs here.
Here's the relevant part of my workflow.yml:
- run: sudo chmod -R 0777 /var/snap/lxd/common/lxd
- name: Cache build environment
uses: actions/cache@v4
with:
path: '/var/snap/lxd/common/lxd/storage-pools/default/containers/snapcraft-juju'
key: snapcraft-build-env-${{ runner.os }}
- run: sudo chmod -R 0777 /var/snap/lxd/common/lxd