# Fix file permissions after restoring cache

**URL:** <https://discuss.circleci.com/t/fix-file-permissions-after-restoring-cache/28790>\
**Category:** Tips, Tricks, and Hacks\
**Tags:** cache, permissions\
**Created:** [March 6, 2019, 8:25am UTC](https://discuss.circleci.com/t/fix-file-permissions-after-restoring-cache/28790 "2019-03-06T08:25:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeckel](https://avatars.discourse-cdn.com/v4/letter/j/ec9cab/32.png) [@jeckel](https://discuss.circleci.com/u/jeckel)\
**Post date:** [March 6, 2019, 8:25am UTC](https://discuss.circleci.com/t/fix-file-permissions-after-restoring-cache/28790/1 "2019-03-06T08:25:02Z")

</div>

Here is a small tips I use when I share cache between different jobs which use a different configuration / user:

```
 steps:
      restore_cache:
           name: Restore project's cache
           keys:
               - source-v1-{{ .Environment.CIRCLE_SHA1 }}
      run:
           name: Fix permissions
           command: sudo chown -R $(id -u):$(id -g) .
```
