From 35cfbefcc7419de59cfcc170514098cf85ff85c4 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Wed, 27 Mar 2024 14:35:34 +0100 Subject: [PATCH] fix permissions for temp upload file when uploading via API --- 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 2266c6c58597..100b1d32b9b7 100644 --- a/lib/galaxy/webapps/galaxy/services/tools.py +++ b/lib/galaxy/webapps/galaxy/services/tools.py @@ -72,6 +72,7 @@ def create_fetch( 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