diff --git a/scripts/genrootfs.sh b/scripts/genrootfs.sh
index 2c2c938a06d4d34d0da29da5ef4906a8cb2cd27a..72f2c8f9e4d4d3beae42b3128347e2abf1af7e75 100755
--- a/scripts/genrootfs.sh
+++ b/scripts/genrootfs.sh
@@ -6,6 +6,7 @@ cleanup() {
 
 tmp="$(mktemp -d)"
 trap cleanup EXIT
+chmod 0755 "$tmp"
 
 arch="$(apk --print-arch)"
 repositories_file=/etc/apk/repositories