diff --git a/src/lib66/parser_enabled.c b/src/lib66/parser_enabled.c
index 54a017f530a9b9599cbebc4e6458b6c4114421b6..f9463109946017cea54ccd538ff40483c714989c 100644
--- a/src/lib66/parser_enabled.c
+++ b/src/lib66/parser_enabled.c
@@ -16,6 +16,7 @@
 
 #include <string.h>
 #include <stdio.h> //rename
+#include <stdlib.h> //setenv
 
 #include <oblibs/string.h>
 #include <oblibs/types.h>
@@ -28,6 +29,7 @@
 #include <skalibs/stralloc.h>
 #include <skalibs/direntry.h>
 #include <skalibs/djbunix.h>
+#include <skalibs/env.h>
 
 #include <66/resolve.h>
 #include <66/utils.h>
@@ -282,7 +284,12 @@ int parse_module(sv_alltype *sv_before,char const *svname,uid_t owner,uint8_t fo
 		size_t clen = sv_before->type.module.configure > 0 ? 1 : 0 ;
 		char const *newargv[2 + clen] ;
 		unsigned int m = 0 ;
-	
+		/** only overwrite the PWD variable
+		 * Bash do not respect this, it set
+		 * automatically the PWD variable. */
+
+		if (setenv("PWD",tmp.s,1) < 0) log_warnusys_return(LOG_EXIT_SYS,"set pwd environment variable") ;
+
 		newargv[m++] = tmp.s ;
 		if (sv_before->type.module.configure > 0)
 			newargv[m++] = keep.s + sv_before->type.module.configure ;