From 72452380faa3a3e95b78a4f798644065dff27c06 Mon Sep 17 00:00:00 2001 From: Brian Bockelman Date: Wed, 9 Oct 2024 07:58:52 -0500 Subject: [PATCH] Switch write capability to `storage.modify` When generating a token, particularly for the `sync` command, we want to have the ability to overwrite incomplete remote files. --- client/acquire_token.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/acquire_token.go b/client/acquire_token.go index 81693661d..40269e62e 100644 --- a/client/acquire_token.go +++ b/client/acquire_token.go @@ -812,7 +812,7 @@ func generateToken(destination *url.URL, dirResp server_structs.DirectorResponse tc.Subject = "client_token" ts := token_scopes.Storage_Read if opts.Operation == config.TokenSharedWrite { - ts = token_scopes.Storage_Create + ts = token_scopes.Storage_Modify } if after, found := strings.CutPrefix(path.Clean(destination.Path), path.Clean(dirResp.XPelNsHdr.Namespace)); found { tc.AddResourceScopes(token_scopes.NewResourceScope(ts, after))