diff --git a/setup/linux-installer.py b/setup/linux-installer.py index 6d18e36059..cc127d825b 100644 --- a/setup/linux-installer.py +++ b/setup/linux-installer.py @@ -694,9 +694,12 @@ def check_umask(): mask = os.umask(18) # 18 = 022 os.umask(mask) forbid_user_read = mask & stat.S_IRUSR + forbid_user_exec = mask & stat.S_IXUSR forbid_group_read = mask & stat.S_IRGRP + forbid_group_exec = mask & stat.S_IXGRP forbid_other_read = mask & stat.S_IROTH - if forbid_user_read or forbid_group_read or forbid_other_read: + forbid_other_exec = mask & stat.S_IXOTH + if forbid_user_read or forbid_user_exec or forbid_group_read or forbid_group_exec or forbid_other_read or forbid_other_exec: prints( 'WARNING: Your current umask disallows reading of files by some users,' ' this can cause system breakage when running the installer because' @@ -709,7 +712,7 @@ def check_umask(): break prints('Response', q, 'not understood') if q == 'f': - mask = mask & ~stat.S_IRUSR & ~stat.S_IRGRP & ~stat.S_IROTH + mask = mask & ~stat.S_IRUSR & ~stat.S_IXUSR & ~stat.S_IRGRP & ~stat.S_IXGRP & ~stat.S_IROTH & ~stat.S_IXOTH os.umask(mask) prints('umask changed to: {:03o}'.format(mask)) elif q == 'i': diff --git a/setup/linux-installer.sh b/setup/linux-installer.sh index 557bf096c7..f9036e16d3 100644 --- a/setup/linux-installer.sh +++ b/setup/linux-installer.sh @@ -743,9 +743,12 @@ def check_umask(): mask = os.umask(18) # 18 = 022 os.umask(mask) forbid_user_read = mask & stat.S_IRUSR + forbid_user_exec = mask & stat.S_IXUSR forbid_group_read = mask & stat.S_IRGRP + forbid_group_exec = mask & stat.S_IXGRP forbid_other_read = mask & stat.S_IROTH - if forbid_user_read or forbid_group_read or forbid_other_read: + forbid_other_exec = mask & stat.S_IXOTH + if forbid_user_read or forbid_user_exec or forbid_group_read or forbid_group_exec or forbid_other_read or forbid_other_exec: prints( 'WARNING: Your current umask disallows reading of files by some users,' ' this can cause system breakage when running the installer because' @@ -758,7 +761,7 @@ def check_umask(): break prints('Response', q, 'not understood') if q == 'f': - mask = mask & ~stat.S_IRUSR & ~stat.S_IRGRP & ~stat.S_IROTH + mask = mask & ~stat.S_IRUSR & ~stat.S_IXUSR & ~stat.S_IRGRP & ~stat.S_IXGRP & ~stat.S_IROTH & ~stat.S_IXOTH os.umask(mask) prints('umask changed to: {:03o}'.format(mask)) elif q == 'i':