@@ -3576,7 +3576,7 @@ function _add_jailkit_user()
35763576 // add the user to the chroot
35773577 $ jailkit_chroot_userhome = $ this ->_get_home_dir ($ this ->website ['system_user ' ]);
35783578
3579- if (!is_dir ($ this ->website ['document_root ' ].'/etc ' )) mkdir ($ this ->website ['document_root ' ].'/etc ' );
3579+ if (!is_dir ($ this ->website ['document_root ' ].'/etc ' )) $ app -> system -> mkdir ($ this ->website ['document_root ' ].'/etc ' , 0755 , true );
35803580 if (!is_file ($ this ->website ['document_root ' ].'/etc/passwd ' )) $ app ->system ->exec_safe ('touch ? ' , $ this ->website ['document_root ' ].'/etc/passwd ' );
35813581
35823582 // IMPORTANT!
@@ -3585,10 +3585,11 @@ function _add_jailkit_user()
35853585 // and the user has FULL ACCESS to the root of the server!
35863586 $ app ->system ->create_jailkit_user ($ this ->website ['system_user ' ], $ this ->website ['document_root ' ], $ jailkit_chroot_userhome );
35873587
3588- $ app ->system ->mkdir ($ this ->website ['document_root ' ].$ jailkit_chroot_userhome , 0755 , true );
3589- $ app ->system ->chown ($ this ->website ['document_root ' ].$ jailkit_chroot_userhome , $ this ->website ['system_user ' ]);
3590- $ app ->system ->chgrp ($ this ->website ['document_root ' ].$ jailkit_chroot_userhome , $ this ->website ['system_group ' ]);
3591-
3588+ if (!is_dir ($ this ->website ['document_root ' ].$ jailkit_chroot_userhome )) {
3589+ $ app ->system ->mkdir ($ this ->website ['document_root ' ].$ jailkit_chroot_userhome , 0750 , true );
3590+ $ app ->system ->chown ($ this ->website ['document_root ' ].$ jailkit_chroot_userhome , $ this ->website ['system_user ' ]);
3591+ $ app ->system ->chgrp ($ this ->website ['document_root ' ].$ jailkit_chroot_userhome , $ this ->website ['system_group ' ]);
3592+ }
35923593 $ app ->log ("Added created jailkit user home in : " .$ this ->website ['document_root ' ].$ jailkit_chroot_userhome , LOGLEVEL_DEBUG );
35933594 }
35943595
0 commit comments