From 91aad66e164bc24725092f506ef5b84a0fd17ba5 Mon Sep 17 00:00:00 2001 From: shreyamalviya Date: Wed, 9 Jun 2021 19:44:35 +0530 Subject: [PATCH] Modify log message when checking file permissions Removed code to display it in octal since it makes no sense on Windows. Added `oct()` around linux permissions when expected_permissions is being defined. --- .../monkey_island/cc/setup/island_config_options_validator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/monkey_island/cc/setup/island_config_options_validator.py b/monkey/monkey_island/cc/setup/island_config_options_validator.py index 66df126be..fcfa524ca 100644 --- a/monkey/monkey_island/cc/setup/island_config_options_validator.py +++ b/monkey/monkey_island/cc/setup/island_config_options_validator.py @@ -26,9 +26,9 @@ def _raise_if_incorrect_permissions( f: str, linux_expected_permissions: int, windows_expected_permissions: int ): expected_permissions = ( - windows_expected_permissions if is_windows_os() else linux_expected_permissions + windows_expected_permissions if is_windows_os() else oct(linux_expected_permissions) ) if not has_expected_permissions(f, expected_permissions): raise InsecurePermissionsError( - f"The file {f} has incorrect permissions. Expected: {oct(expected_permissions)}" + f"The file {f} has incorrect permissions. Expected: {expected_permissions}" )