Image Builder places files in /tmp folder and tries to execute them

0
  1. As part of Image hardening we add noexec option to /tmp partition as part of the build step.

  2. After that when Imagebuilder runs tests by launching the hardened image it is unable to initiate since it places executable files in /tmp.

Error Message:
/tmp/**/TaskOrchestratorAndExecutor/bootstrap.sh: Permission denied

Is there a workaround for this ? (we need the noexec option to build a compliant image)

Edited by: anany on Sep 11, 2020 4:46 AM

anany
已提问 4 年前1051 查看次数
1 回答
0

Found the solution in the docs
https://docs.aws.amazon.com/imagebuilder/latest/userguide/image-builder-troubleshooting.html
Solution:
Possible cause: The /tmp directory is classified as noexec, which can cause Image Builder to fail.

Resolution: Choose a different location to use as the working directory in the workingDirectory field of the image recipe. For more information, see the ImageRecipe data type description.

anany
已回答 4 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则