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
This commit is contained in:
Chris Lu
2026-01-27 18:41:37 -08:00
committed by GitHub
parent 4f5f1f6be7
commit 8e9c12e2c7

View File

@@ -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
}