diff --git a/cli/__main__.py b/cli/__main__.py index 34dd563..4a40ccd 100644 --- a/cli/__main__.py +++ b/cli/__main__.py @@ -17,8 +17,23 @@ def _handle_exception(identifier, message, traceback): if __name__ == '__main__': - Path(Constants.HV_CONFIG_HOME).mkdir(parents=True, exist_ok=True) - Path(Constants.HV_DATA_HOME).mkdir(parents=True, exist_ok=True) + for path in [ + Constants.HV_CONFIG_HOME, + Constants.HV_DATA_HOME, + Constants.HV_STATE_HOME, + Constants.HV_CACHE_HOME, + Constants.HV_PROFILE_CONFIG_HOME, + Constants.HV_PROFILE_DATA_HOME, + Constants.HV_TICKETING_CONFIG_HOME, + Constants.HV_TICKETING_DATA_HOME, + Constants.HV_APPLICATION_DATA_HOME, + Constants.HV_INCIDENT_DATA_HOME, + Constants.HV_RUNTIME_DATA_HOME, + Constants.HV_SESSION_STATE_HOME, + Constants.HV_TOR_STATE_HOME, + Constants.SINGBOX_CONFIG_DIR, + ]: + Path(path).mkdir(parents=True, exist_ok=True, mode=0o700) sys.excepthook = _handle_exception