diff --git a/shellscripts/cron_deployment.php b/shellscripts/cron_deployment.php
index 29b47151dfacd60daf0ef765e7afeaa5981fda99..a0162b8cfc37f37d54e1ac8bf0fcac9f13b5f4fd 100644
--- a/shellscripts/cron_deployment.php
+++ b/shellscripts/cron_deployment.php
@@ -9,6 +9,10 @@
 // http://iml:deployment@ci.iml.unibe.ch/deployment/?prj=ci&action=deploy&par3=preview&confirm=1
 
 $sDocroot = (dirname(__dir__)) . "/public_html";
+$processUser = posix_getpwuid(posix_geteuid());
+if ($processUser['name']=="root"){
+    die("Do not start the script as user root\n");
+};
 
 require_once("$sDocroot/deployment/classes/logger.class.php");
 global $oCLog;
diff --git a/shellscripts/cron_sync_packages.php b/shellscripts/cron_sync_packages.php
index 11ff4cd4e65443f9b588469dc3bbac71e53c460f..3536b8a4e520b24bcb391af005236b5eeae4bb86 100644
--- a/shellscripts/cron_sync_packages.php
+++ b/shellscripts/cron_sync_packages.php
@@ -9,6 +9,10 @@
     require_once(dirname(__DIR__)."/config/inc_projects_config.php");
     
     echo "\n========= SYNC archive files ==========\n";
+    $processUser = posix_getpwuid(posix_geteuid());
+    if ($processUser['name']=="root"){
+        die("Do not start the script as user root\n");
+    };
     
     if (array_key_exists('mirrorPackages', $aConfig) && count($aConfig['mirrorPackages']) ){
         foreach (array_keys($aConfig["phases"]) as $sPhase){