Fix sec overly permissive file permissions

775 is too permissive for this  file, '-rwxr--r--' is more than enough
B103: Test for setting permissive file permissions
https://bandit.readthedocs.io/en/latest/plugins/b103_set_bad_file_permissions.html
This commit is contained in:
Zedifus 2022-08-31 19:50:35 +01:00
parent fdf1a5a41d
commit 0c9e10f18a

View File

@ -1125,7 +1125,7 @@ class ServerInstance:
FileHelpers.unzip_file(unzip_path)
# adjusts permissions for execution if os is not windows
if not self.helper.is_os_windows():
os.chmod(os.path.join(self.settings["path"], "bedrock_server"), 0o0775)
os.chmod(os.path.join(self.settings["path"], "bedrock_server"), 0o0744)
# we'll delete the zip we downloaded now
os.remove(os.path.join(self.settings["path"], "bedrock_server.zip"))