From 030b768eeb065b10f2cde86a88714a2706875d03 Mon Sep 17 00:00:00 2001 From: Troy Varney Date: Thu, 12 Nov 2020 15:36:32 -0600 Subject: [PATCH] DEVTOOLS-7936: Set permissions on public packages This updates the public repository upload process to change the group on the uploaded files to `cf` and adds the write permission for members of the group. This should allow the `cf` user to properly overwrite the file when signing it. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4d2441f0..157bd3bd 100644 --- a/Makefile +++ b/Makefile @@ -89,6 +89,7 @@ define publish_package for HOST in $(CF_PKG_HOSTS); do \ ssh-keyscan -t rsa $$HOST >> ~/.ssh/known_hosts; \ scp -4 cloudflared*.$(1) cfsync@$$HOST:/state/cf-pkg/staging/$(2)/$(TARGET_PUBLIC_REPO)/cloudflared/; \ + ssh cfsync@$$HOST 'chgrp cf /state/cf-pkg/staging/$(2)/$(TARGET_PUBLIC_REPO)/cloudflared/*.$(1) && chmod g+w /state/cf-pkg/staging/$(2)/$(TARGET_PUBLIC_REPO)/cloudflared/*.$(1)'; \ done endef @@ -225,4 +226,4 @@ vet: .PHONY: msi msi: cloudflared - go-msi make --msi cloudflared.msi --version $(MSI_VERSION) \ No newline at end of file + go-msi make --msi cloudflared.msi --version $(MSI_VERSION)