# Permission error requesting big files

**URL:** <https://discuss.konghq.com/t/permission-error-requesting-big-files/7908>\
**Category:** Questions\
**Created:** [February 17, 2021, 9:52am UTC](https://discuss.konghq.com/t/permission-error-requesting-big-files/7908 "2021-02-17T09:52:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![airampr](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@airampr](https://discuss.konghq.com/u/airampr)\
**Post date:** [February 17, 2021, 9:52am UTC](https://discuss.konghq.com/t/permission-error-requesting-big-files/7908/1 "2021-02-17T09:52:29Z")

</div>

Hi,

When I try to make a get request to Kong to pick up a file from the server, kong shows me the following error:

```
request: "GET /alpha/fileSystem/6d3cfcbb-2f06-4332-bf18-59b686345191/download/e04383d8-bba8-44da-a67f-e514e68d8dbd.pdf HTTP/1.1", upstream: "http://...", host: "...:8000", referrer: "http://..."
2021/02/16 12:56:24 [crit] 19#0: *3516 open() "/usr/local/kong/proxy_temp/1/01/0000000011" failed (13: Permission denied) while reading upstream, client: 192. ..., server: kong, request: "GET /alpha/fileSystem/6d3cfcbb-2f06-4332-bf18-59b686345191/download/e04383d8-bba8-44da-a67f-e514e68d8dbd.pdf HTTP/1.1", upstream: "http://...", referrer:

```

It only occurs on some particular files and not on others, the only difference I have seen in them is the size.

I have tried several configurations in the kong.conf to allow me to return larger files, but what I don’t understand is that the error is a permissions error and not an oversize error.

Any help would be greatly appreciated,

Thanks.

---

<div class="post-metadata">

**Author:** ![raleman](https://avatars.discourse-cdn.com/v4/letter/r/cab0a1/32.png) [@raleman](https://discuss.konghq.com/u/raleman)\
**Post date:** [February 21, 2021, 1:35pm UTC](https://discuss.konghq.com/t/permission-error-requesting-big-files/7908/2 "2021-02-21T13:35:27Z")

</div>

Hi,

The error that you are seeing is caused by a problem with local filesystem permissions on your proxy\_temp\_path native value of nginx ([Module ngx\_http\_proxy\_module](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_temp_path)), that is /usr/local/kong/proxy\_temp by default.

On upstream responses higher than the default value for proxy buffers ([Module ngx\_http\_proxy\_module](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffers)), Kong buffers to disk the response to that folder, so you are seeing that errors on big files requests because of that.

You can modify that variables with the Kong injected directives to increase the buffer size, and also you need to check the user under wich is running Kong and the owner/perms of the proxy\_temp folder.

Regards
