From eee3abef8e501212ffd6c754221c067ee97eff91 Mon Sep 17 00:00:00 2001 From: Jip-Hop <2871973+Jip-Hop@users.noreply.github.com> Date: Sat, 6 Apr 2024 11:20:31 +0200 Subject: [PATCH] Stat_chmod jails dir during non-interactive create --- jlmkr.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jlmkr.py b/jlmkr.py index e1b612a..e376724 100755 --- a/jlmkr.py +++ b/jlmkr.py @@ -951,10 +951,6 @@ def interactive_config(): recommended_distro = config.my_get("distro") recommended_release = config.my_get("release") - # Create the dir where to store the jails - os.makedirs(JAILS_DIR_PATH, exist_ok=True) - stat_chmod(JAILS_DIR_PATH, 0o700) - ################# # Config handling ################# @@ -1249,6 +1245,10 @@ def create_jail(**kwargs): # Cleanup in except, but only once the jail_path is final # Otherwise we may cleanup the wrong directory try: + # Create the dir where to store the jails + os.makedirs(JAILS_DIR_PATH, exist_ok=True) + stat_chmod(JAILS_DIR_PATH, 0o700) + jail_config_path = get_jail_config_path(jail_name) jail_rootfs_path = get_jail_rootfs_path(jail_name)