From 8e9c12e2c71872f2bd0ce1f1477eea0a0022711a Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 27 Jan 2026 18:41:37 -0800 Subject: [PATCH] mount: apply UID/GID mapping in lookupEntry for cache misses (#8144) * mount: apply UID/GID mapping in lookupEntry for cache misses This fixes issue #8134 where rsync would fail with "Operation not permitted" during chgrp. The issue was that entries fetched directly from the filer (on cache miss) were not being mapped to local UIDs/GIDs. * mount: add nil check for entry.Attributes in lookupEntry --- weed/mount/weedfs.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weed/mount/weedfs.go b/weed/mount/weedfs.go index 1234fa005..14a135e04 100644 --- a/weed/mount/weedfs.go +++ b/weed/mount/weedfs.go @@ -306,6 +306,9 @@ func (wfs *WFS) lookupEntry(fullpath util.FullPath) (*filer.Entry, fuse.Status) glog.V(1).Infof("lookupEntry GetEntry %s: %v", fullpath, err) return nil, fuse.ENOENT } + if entry != nil && entry.Attributes != nil && wfs.option.UidGidMapper != nil { + entry.Attributes.Uid, entry.Attributes.Gid = wfs.option.UidGidMapper.FilerToLocal(entry.Attributes.Uid, entry.Attributes.Gid) + } return filer.FromPbEntry(dir, entry), fuse.OK }