diff --git a/src/lib66/write/write_execute_scripts.c b/src/lib66/write/write_execute_scripts.c
index 56795a598d0e377f17f0427cc664d5eed9cfca46..fe850860096cf40842d6627f93a35ad240b20060 100644
--- a/src/lib66/write/write_execute_scripts.c
+++ b/src/lib66/write/write_execute_scripts.c
@@ -60,8 +60,11 @@ int write_execute_scripts(char const *file, char const *contents, char const *ds
 
         if (colon) {
 
-            uid = file ;
-            gid = colon + 1 ;
+            if (!uid0_scan(file, &uid))
+                log_warnu_return(LOG_EXIT_ZERO,"get uid of: ", runas) ;
+
+            if (!gid0_scan(colon + 1, &gid))
+                log_warnu_return(LOG_EXIT_ZERO,"get gid of: ", runas) ;
 
         } else {