elasticsearch error: /usr/local/bin/docker-entrypoint.sh: cannot create temp file for here-document: Permission denied

I am new to elasticsearch and i want to install ELK on my linux local server using docker compose method. I took the .env and docker-compose files from the following url:

[elasticsearch/docs/reference/setup/install/docker at 8.15 · elastic/elasticsearch · GitHub](https://stackoverflow.com/](https://)

but when I want to up the container I get the following error:

WARN[0000] /workdir/app/elasticsearch/docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
es01-1  | Created elasticsearch keystore in /usr/share/elasticsearch/config/elasticsearch.keystore
es03-1   | /usr/local/bin/docker-entrypoint.sh: line 84: cannot create temp file for here-document: Permission denied
setup-1  | Setting file permissions
setup-1  | Waiting for Elasticsearch availability
es01-1   | /usr/local/bin/docker-entrypoint.sh: line 73: cannot create temp file for here-document: Permission denied
es02-1   | /usr/local/bin/docker-entrypoint.sh: line 84: cannot create temp file for here-document: Permission denied

does anyone know why this is?

Thankyou