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

Prevent ES from writing to /tmp on startup #74162

Open
pgomulka opened this issue Jun 16, 2021 · 3 comments · May be fixed by #75164
Open

Prevent ES from writing to /tmp on startup #74162

pgomulka opened this issue Jun 16, 2021 · 3 comments · May be fixed by #75164

Comments

@pgomulka
Copy link
Contributor

@pgomulka pgomulka commented Jun 16, 2021

Elasticsearch is started using a bash script which by default can write files to /tmp directory. This is because <<< in bash is implemented using temporary files (creates /tmp/sh-thd.random string) https://itectec.com/ubuntu/ubuntu-whats-the-difference-between/
This can be reconfigured by changing TMP and TEMP environment variables.
or we should refactor the script to avoid using << or <<<

@elasticmachine
Copy link
Collaborator

@elasticmachine elasticmachine commented Jun 16, 2021

Pinging @elastic/es-core-infra (Team:Core/Infra)

@randallwvr90
Copy link

@randallwvr90 randallwvr90 commented Jun 22, 2021

I found this by searching the "good first issue" tag.

It looks like Elasticsearch is started and the environment variables are set with these two scripts, is that right?

  • distribution/src/bin/elasticsearch
  • distribution/src/bin/elasticsearch-env

Is elastisearch-env the correct place to set the TMP and TEMP environment variables?
What directory would be the right place for the temporary files to be created?

@qilingzhao
Copy link

@qilingzhao qilingzhao commented Jul 9, 2021

Hi @pgomulka , i have commit a PR, please review it, thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

7 participants