Files
seaweedfs/weed/sftpd
4f6c138beb sftp: report file owners in stat and listings (#13340)
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>
2026-12-03 10:40:49 -08:00
..