From 8d1bff555fb2d5b5425424a456a52f23e13798ad Mon Sep 17 00:00:00 2001 From: Johannes Koester Date: Fri, 23 Feb 2024 16:46:24 +0100 Subject: [PATCH 1/2] fix: respect permissions of the target dir, especially setgid --- snakemake_storage_plugin_fs/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/snakemake_storage_plugin_fs/__init__.py b/snakemake_storage_plugin_fs/__init__.py index 8d4b0aa..7c457f6 100644 --- a/snakemake_storage_plugin_fs/__init__.py +++ b/snakemake_storage_plugin_fs/__init__.py @@ -36,7 +36,7 @@ @dataclass class StorageProviderSettings(StorageProviderSettingsBase): - latency_wait: int = field( + latency_wait: Optional[int] = field( default=1, metadata={ "help": "Time in seconds to wait until retry if file operation is not " @@ -231,8 +231,11 @@ def store_object(self): # Ensure that the object is stored at the location specified by # self.local_path(). self.query_path.parent.mkdir(exist_ok=True, parents=True) + # We want to respect the permissions in the target folder, in particular the + # setgid bit. Hence, we use --no-p to avoid preserving of permissions from the + # source to the target. cmd = sysrsync.get_rsync_command( - str(self.local_path()), str(self.query_path), options=["-av"] + str(self.local_path()), str(self.query_path), options=["-av", "--no-p"] ) self._run_cmd(cmd) From a2a2ebcb66a90c302cb7c806d3a37f4d97df0f73 Mon Sep 17 00:00:00 2001 From: Johannes Koester Date: Fri, 23 Feb 2024 16:46:30 +0100 Subject: [PATCH 2/2] fmt --- snakemake_storage_plugin_fs/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snakemake_storage_plugin_fs/__init__.py b/snakemake_storage_plugin_fs/__init__.py index 7c457f6..ec4859e 100644 --- a/snakemake_storage_plugin_fs/__init__.py +++ b/snakemake_storage_plugin_fs/__init__.py @@ -231,7 +231,7 @@ def store_object(self): # Ensure that the object is stored at the location specified by # self.local_path(). self.query_path.parent.mkdir(exist_ok=True, parents=True) - # We want to respect the permissions in the target folder, in particular the + # We want to respect the permissions in the target folder, in particular the # setgid bit. Hence, we use --no-p to avoid preserving of permissions from the # source to the target. cmd = sysrsync.get_rsync_command(