From 557aa9aec17721d48cd7b3f750553bc289f41e10 Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Fri, 12 May 2023 12:14:17 -0700 Subject: [PATCH 1/3] Respect RFC-0097 --- src/action/base/move_unpacked_nix.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/action/base/move_unpacked_nix.rs b/src/action/base/move_unpacked_nix.rs index 9e932537..c65045c1 100644 --- a/src/action/base/move_unpacked_nix.rs +++ b/src/action/base/move_unpacked_nix.rs @@ -88,6 +88,13 @@ impl Action for MoveUnpackedNix { .await .map_err(|e| ActionErrorKind::CreateDirectory(dest_store.clone(), e)) .map_err(Self::error)?; + let perms: Permissions = PermissionsExt::from_mode(0o735); + tokio::fs::set_permissions(&dest_store, perms.clone()) + .await + .map_err(|e| { + ActionErrorKind::SetPermissions(perms.mode(), dest_store.to_owned(), e) + }) + .map_err(Self::error)?; } while let Some(entry) = src_store_listing From d2aad5772ee9a8fdf5c82b923db1d168ed90b1cb Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Mon, 15 May 2023 09:47:43 -0700 Subject: [PATCH 2/3] Also update permissions --- src/action/base/move_unpacked_nix.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/action/base/move_unpacked_nix.rs b/src/action/base/move_unpacked_nix.rs index c65045c1..eb7c6f59 100644 --- a/src/action/base/move_unpacked_nix.rs +++ b/src/action/base/move_unpacked_nix.rs @@ -88,14 +88,13 @@ impl Action for MoveUnpackedNix { .await .map_err(|e| ActionErrorKind::CreateDirectory(dest_store.clone(), e)) .map_err(Self::error)?; - let perms: Permissions = PermissionsExt::from_mode(0o735); - tokio::fs::set_permissions(&dest_store, perms.clone()) - .await - .map_err(|e| { - ActionErrorKind::SetPermissions(perms.mode(), dest_store.to_owned(), e) - }) - .map_err(Self::error)?; } + let perms: Permissions = PermissionsExt::from_mode(0o735); + tracing::warn!(?perms, ?dest_store, "Setting permissions"); + tokio::fs::set_permissions(&dest_store, perms.clone()) + .await + .map_err(|e| ActionErrorKind::SetPermissions(perms.mode(), dest_store.to_owned(), e)) + .map_err(Self::error)?; while let Some(entry) = src_store_listing .next_entry() From e1fadc0c6035d00dae2cc8f62db592da8b68937f Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Mon, 15 May 2023 09:49:32 -0700 Subject: [PATCH 3/3] Don't log --- src/action/base/move_unpacked_nix.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/action/base/move_unpacked_nix.rs b/src/action/base/move_unpacked_nix.rs index eb7c6f59..3d19d555 100644 --- a/src/action/base/move_unpacked_nix.rs +++ b/src/action/base/move_unpacked_nix.rs @@ -90,7 +90,6 @@ impl Action for MoveUnpackedNix { .map_err(Self::error)?; } let perms: Permissions = PermissionsExt::from_mode(0o735); - tracing::warn!(?perms, ?dest_store, "Setting permissions"); tokio::fs::set_permissions(&dest_store, perms.clone()) .await .map_err(|e| ActionErrorKind::SetPermissions(perms.mode(), dest_store.to_owned(), e))