mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 10:07:28 +01:00
Stat, lstat and directory listings always showed uid 0 and gid 0, although the filer stores the uploader's Uid and Gid. pkg/sftp only sends the owner when the os.FileInfo implements its FileInfoUidGid interface (Uid() and Gid()). EnhancedFileInfo exposed the owner through an Owner() method and a custom Sys() struct instead, which pkg/sftp never reads. Implement Uid() and Gid() on EnhancedFileInfo and drop the unused Owner(), Sys() and FileStat. Add a test that serves a session over in-memory pipes and checks the owner returned by Stat and ReadDir. Co-authored-by: Denis Maier <denis@dAir.lab> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>