From e7a26aa2d1fc9570925637a7d1ea9015c02d0b5e Mon Sep 17 00:00:00 2001 From: shreyamalviya Date: Wed, 19 May 2021 16:01:35 +0530 Subject: [PATCH] Rename `set_data_dir_security_to_read_by_owner()` to `set_data_dir_security_to_read_and_write_by_owner` --- monkey/monkey_island/cc/environment/data_dir_generator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/monkey/monkey_island/cc/environment/data_dir_generator.py b/monkey/monkey_island/cc/environment/data_dir_generator.py index a809f4360..5883cf25b 100644 --- a/monkey/monkey_island/cc/environment/data_dir_generator.py +++ b/monkey/monkey_island/cc/environment/data_dir_generator.py @@ -15,17 +15,17 @@ def create_data_dir(data_dir: str) -> None: if not os.path.isdir(data_dir): os.makedirs(data_dir, mode=0o700) if is_windows_os: # `mode=0o700` doesn't work on Windows - set_data_dir_security_to_read_by_owner(data_dir_path=data_dir) + set_data_dir_security_to_read_and_write_by_owner(data_dir_path=data_dir) def create_default_data_dir() -> None: if not os.path.isdir(DEFAULT_DATA_DIR): os.mkdir(DEFAULT_DATA_DIR, mode=0o700) if is_windows_os: # `mode=0o700` doesn't work on Windows - set_data_dir_security_to_read_by_owner(data_dir_path=DEFAULT_DATA_DIR) + set_data_dir_security_to_read_and_write_by_owner(data_dir_path=DEFAULT_DATA_DIR) -def set_data_dir_security_to_read_by_owner(data_dir_path: str) -> None: +def set_data_dir_security_to_read_and_write_by_owner(data_dir_path: str) -> None: user = get_user_pySID_object() # current user is newly created data dir's owner security_descriptor = win32security.GetFileSecurity(