# Permission to assets files denied as an admin user

**URL:** <https://community.directus.com/t/permission-to-assets-files-denied-as-an-admin-user/401>\
**Category:** Help\
**Created:** [May 24, 2025, 3:25pm UTC](https://community.directus.com/t/permission-to-assets-files-denied-as-an-admin-user/401 "2025-05-24T15:25:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jee](https://sea2.discourse-cdn.com/flex002/user_avatar/community.directus.com/jee/32/1376_2.png) [@jee](https://community.directus.com/u/jee)\
**Post date:** [May 24, 2025, 3:25pm UTC](https://community.directus.com/t/permission-to-assets-files-denied-as-an-admin-user/401/1 "2025-05-24T15:25:30Z")

</div>

Hi,  
I ran into this strange bug where I couldn’t access any assets i mean files are not displayed (accessing to collection was ok), even when logged in as the admin user.

At first, I thought it was an S3 storage issue, but everything looks fine on that side. Then I suspected Redis, but I didn’t see any errors there either.

The only error I found was in the Directus container logs:

```auto
[16:55:33.671] DEBUG: You don't have permission to access this.

    err: {
      "type": "",
      "message": "You don't have permission to access this.",
      "stack":
          DirectusError: You don't have permission to access this.
              at AssetsService.getAsset (file:///directus/node_modules/.pnpm/@directus+api@file+api_@types+node@22.13.8_@unhead+vue@1.11.20_vue@3.5.13_typescript@5.8.2 ____ jigekj2vspo2admkgggvl64evi/node_modules/@directus/api/dist/services/assets.js:56:19)
              at async file:///directus/node_modules/.pnpm/@directus+api@file+api_@types+node@22.13.8_@unhead+vue@1.11.20_vue@3.5.13_typescript@5.8.2 ____ jigekj2vspo2admkgggvl64evi/node_modules/@directus/api/dist/controllers/assets.js:154:36
      "name": "DirectusError",
      "code": "FORBIDDEN",
      "status": 403
    }

[16:55:33] GET /assets/a77752fd-1e05-4a25-b4f0-12df09f3f856?key=system-medium-cover 403 15.1s

```

I had to restart my stack, and now everything works fine again.  
I’m still trying to figure out what went wrong to avoid this in the future.

Docker Swarm Setup :

- Directus 11.7.2 official image `directus/directus:11.7.2`
- Postgres `postgis/postgis:17-master`
- Redis `registry.redict.io/redict:7-alpine`
- Hetzner Object Storage (S3-compatible)

If you have any thoughts or ideas on what could have caused this, I’d appreciate the help! 🙏

---

<div class="post-metadata">

**Author:** ![bryantgillespie](https://sea2.discourse-cdn.com/flex002/user_avatar/community.directus.com/bryantgillespie/32/33_2.png) [@bryantgillespie](https://community.directus.com/u/bryantgillespie)\
**Post date:** [June 14, 2025, 2:29pm UTC](https://community.directus.com/t/permission-to-assets-files-denied-as-an-admin-user/401/2 "2025-06-14T14:29:36Z")

</div>

I’m assuming you were trying to access these within the App Studio. But any other details you have could be helpful.

Most of the time when I see this sort of stuff, it ends up being like a CORS issue or some type of configuration that I’ve got wrong with the file service.

A few things to check:

- **CORS Configuration** - Make sure your `CORS_ENABLED` and `CORS_ORIGIN` environment variables are set correctly
- **File Service Settings** - Double check your storage adapter configuration (local, S3, etc.)
  - [Files | Directus Docs](https://directus.io/docs/configuration/files)

- **Public URL** - Verify your `PUBLIC_URL` environment variable matches your actual domain

If you’re operating within Swarm, then it certainly could be a Redis issue. So you might want to check the configuration there as well.

> **[Cache | Directus Docs](https://directus.io/docs/configuration/cache)**
>
> Explore our resources and powerful data engine to build your projects confidently.

If you can share more details about your setup (hosting environment, storage config, etc.) that would help narrow it down.
