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
asked 4 years ago1035 views
1 Answer
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
answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions