Docker Kong 1.2.1 File upload through Kong API Gateway issue

While uploading the file from KONG API Gateway getting “An unexpected error occurred” error with HTTP status code as 500. If I upload a file using upstream with Kong it’s working. So the problem in KONG API Gateway.

Docker Kong Version: 1.2.1

Error log is: [crit] 71#0: *474 open() “/usr/local/kong/client_body_temp/0000000001” failed (13: Permission denied)

Response Header:

content-type →text/plain; charset=UTF-8

date →Wed, 03 Jul 2019 06:51:00 GMT

server →kong/1.2.1

transfer-encoding →chunked

via →kong/1.2.1

x-kong-proxy-latency →1

x-kong-upstream-latency →2

how to fix these issues?

File permissions issue, not really a Kong issue:

Your webserver(Nginx/Kong) does not have permission to place temporary files(what NGINX/Kong does for large requests) for a buffer zone. You will need to do a CHMOD 777 or something of the sort till you have right permissions for the webserver to be able to write to it: “/usr/local/kong/client_body_temp/*”

While installing this directory not created (client_body_temp). if i created manually and gave the permission still having sample problem. how to fix this issues? where i need to check?