From 94ad8342412148053fc8fb3a137a3f466f0a9f70 Mon Sep 17 00:00:00 2001 From: heisner-tillman Date: Tue, 21 May 2024 17:54:26 +0200 Subject: [PATCH] Add umask-friendly permissions fixing, when creating a temporary file --- lib/galaxy/webapps/galaxy/services/tools.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/galaxy/webapps/galaxy/services/tools.py b/lib/galaxy/webapps/galaxy/services/tools.py index 17cef3adb6af..076d37e5bd97 100644 --- a/lib/galaxy/webapps/galaxy/services/tools.py +++ b/lib/galaxy/webapps/galaxy/services/tools.py @@ -74,6 +74,7 @@ def create_temp_file( dir=trans.app.config.new_file_path, prefix="upload_file_data_", delete=False ) as dest: shutil.copyfileobj(upload_file.file, dest) # type: ignore[misc] # https://github.com/python/mypy/issues/15031 + util.umask_fix_perms(dest.name, trans.app.config.umask, 0o0666) upload_file.file.close() files_payload[f"files_{i}|file_data"] = FilesPayload( filename=upload_file.filename, local_filename=dest.name