diff --git a/bin/yashchiki b/bin/yashchiki
index f96f4c1c0ff6703a902f7dae9da216da8bfc17ef..613452277e57e6781815c1ad71389ae42632a456 100644
--- a/bin/yashchiki
+++ b/bin/yashchiki
@@ -229,6 +229,9 @@ with tempfile.TemporaryDirectory(prefix="spack-", dir=env["TMPDIR"]) \
 
     env = env | {"JOB_TMP_SPACK": temporary_directory_spack}
 
+    # make job temp folder writable for all users (i.e., spack)
+    os.chmod(temporary_directory_spack, 0o777)
+
     # singularity recipe filename defaults to temporary file
     if args.recipe_filename is not None:
         recipe_filename = args.recipe_filename
diff --git a/lib/yashchiki/build_sandbox.sh b/lib/yashchiki/build_sandbox.sh
index f524a71f901e3f8af540b7aad964d1aaf9ab6d09..0162516d749861bf6699eb6b73b5449803d197f4 100755
--- a/lib/yashchiki/build_sandbox.sh
+++ b/lib/yashchiki/build_sandbox.sh
@@ -14,9 +14,6 @@ unset LC_NUMERIC
 unset LC_TIME
 unset LC_MESSAGES
 
-# make job temp folder writable for all users (i.e., spack)
-chmod 777 "${JOB_TMP_SPACK}"
-
 # build the container (using scripts from above)
 if [ -n "${YASHCHIKI_PROXY_HTTP:-}" ]; then
 	export http_proxy=${YASHCHIKI_PROXY_HTTP}