Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assets cannot be accessed from a public account #13057

Closed
eternalflamez opened this issue Apr 29, 2022 · 3 comments
Closed

Assets cannot be accessed from a public account #13057

eternalflamez opened this issue Apr 29, 2022 · 3 comments
Assignees

Comments

@eternalflamez
Copy link

eternalflamez commented Apr 29, 2022

Describe the Bug

Adding read access to the directus_files collection does not give public access to specific assets.

To Reproduce

  • Upload an image
  • Set public access for Directus Files to Read
  • Try to open the path to the image: https://slug.directus.app/assets/id
  • Get a 403 with: You don't have permission to access this

I've also tried giving all permissions for all things on public, hoping that one of them might trigger it so I could get there by process of elimination, but that didn't help either. Note that the image does load when adding a token as a param to the url, or sending it through the headers.

Errors Shown

{
    "errors": [
        {
            "message": "You don't have permission to access this.",
            "extensions": {
                "code": "FORBIDDEN"
            }
        }
    ]
}

What version of Directus are you using?

9.9.1

What version of Node.js are you using?

PaaS - unsure

What database are you using?

PaaS - unsure

What browser are you using?

Chrome

How are you deploying Directus?

PaaS

@ndee85
Copy link

ndee85 commented May 2, 2022

I can confirm that accessing assets seems to have problems with 9.9.1. I just updated from 9.5.0 to 9.9.1 and my images are not being displayed anymore.
Did the process of accessing assets somehow change?

@joselcvarela
Copy link
Member

@eternalflamez I believe your project should be good now.
For cloud related subjects please head to our website chat 👍
Thank you.

@azrikahar
Copy link
Contributor

As OP's issue should be cloud-specific and it should be resolved, I'll close this for now. Will re-open if it turns out to be not the case.

@ndee85 is there any info on the problems such as error logs in the terminal or in the browser console? Could it be CSP (Content Security Policy) related? Happy to debug further if necessary!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants