From 8d3c63a732453a84ed90e21d6b8238223aa9d890 Mon Sep 17 00:00:00 2001 From: Tim Ramlot <42113979+inteon@users.noreply.github.com> Date: Wed, 20 Nov 2024 14:58:53 +0100 Subject: [PATCH] BUGFIX: chown using the full path instead of the relative path Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com> --- storage/filesystem.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/filesystem.go b/storage/filesystem.go index 3a61175..f82d736 100644 --- a/storage/filesystem.go +++ b/storage/filesystem.go @@ -266,7 +266,7 @@ func (f *Filesystem) WriteFiles(meta metadata.Metadata, files map[string][]byte) // If a fsGroup is defined, Chown all files in the timestamped directory. for filename := range files { // Set the uid to -1 which means don't change ownership in Go. - if err := os.Chown(filepath.Join(tsDirName, filename), -1, int(*fsGroup)); err != nil { + if err := os.Chown(filepath.Join(f.dataPathForVolumeID(meta.VolumeID), tsDirName, filename), -1, int(*fsGroup)); err != nil { return err } }