From 42f879687f5618dc08cc2a5151b0bf36db2ade4f Mon Sep 17 00:00:00 2001 From: Michael Kroes Date: Sun, 21 Feb 2016 12:43:04 -0500 Subject: [PATCH] Add check to preflight for exec on tmp --- setup/preflight.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup/preflight.sh b/setup/preflight.sh index 26df3ed..a1899e8 100644 --- a/setup/preflight.sh +++ b/setup/preflight.sh @@ -33,3 +33,11 @@ if [ ! -d /vagrant ]; then exit fi fi + +# Check that tempfs is not mounted with noexec +MOUNTED_TMP_AS_NO_EXEC=$(grep "/tmp.*noexec" /proc/mounts) +if [ -n "$MOUNTED_TMP_AS_NO_EXEC" ]; then + echo "Mail-in-a-Box has to have exec rights on /tmp, please mount /tmp with exec" + + exit +fi