Windows 10 client opens a folder as a file and asks for SMB2 GetInfo SMB2_FILE_STREAM_INFO

Ralph Böhme slow at
Fri May 1 20:22:29 UTC 2020

Hi Ashok,

Am 01.05.2020 um 17:55 schrieb Ashok Ramakrishnan via samba-technical <samba-technical at>:
> We use 4.9.4 based samba in our product and one of our customers is running into a strange issue. If they right click on a folder and get the properties, it reports incorrect size information. When we looked at the network trace, we see that the client is walking the tree and getting information about files and folders.. Suddenly out of the blue, it opens a folder (which it had previous opened and closed as a directory) as a file (Create Options 0x00200020) and then issues a getino file stream info call. Samba promptly responds to this with NO_DATA since there is no stream associated with this folder. After this, things go downhill.. The client starts requesting files with paths without the above folder in the path and rightly gets STATUS_OBJECT_NAME_NOT_FOUND. We have requested our customer to open a support case with Microsoft to help understand the reason for the client behavior... But hoping someone here has had experience troubleshooting similar issues and can provide some tips/pointers on what to look for. I am primarily trying to figure out what could prompt the client to open a folder it knows is a folder, as a file and ask for the stream info. I have looked through the file ID, QFid, etc for any duplication and could not find any. So, why would the client do this?

well, that's one question. Another one would be how a Windows server responds to the exact same sequence of requests.

If I were you, I'd start with modelling an smbtorture testcase that replays the Windows client behaviour. Then find the first difference in server behaviour and work from there. Or similar, ymmv. :)


Ralph Boehme, Samba Team      
Samba Developer, SerNet GmbH
GPG-Fingerprint   FAE2C6088A24252051C559E4AA1E9B7126399E46

More information about the samba-technical mailing list