TalAloni / SMBLibrary

Free, Open Source, User-Mode SMB 1.0/CIFS, SMB 2.0, SMB 2.1 and SMB 3.0 server and client library
GNU Lesser General Public License v3.0
732 stars 185 forks source link

Hello, can you please tell me how Windows deletes files? #209

Closed nvd05 closed 1 year ago

nvd05 commented 1 year ago

Hello, can you please tell me how Windows deletes files?

Windows does not use the FileDispositionInformation class for some reason. But I don't understand how it deletes the file. Can you please explain?

I need this for the cart, as I have to get a delete request and replace it with a move.

The images can be enlarged. Click on it and you will be redirected to the picture

List

image

1 (CreateFile)

image image

2 (GetInfo - Wireshark, QueryInfoRequest - Rider)

image image

3 (GetInfo - Wireshark, QueryInfoRequest - Rider)

image image

4 (CloseFile)

image image

TalAloni commented 1 year ago

This issue section is dedicated to issues with the library. Under SMB2 the standard way to delete files is by using FileDispositionInformation. (there are niche ways to delete files by using IOCTLs but that's not used in practice) The packet session you submitted does not include any command related to file deletion, however your conclusion that "Windows does not use the FileDispositionInformation class for some reason" is incorrect.

I'm closing the issue since it does not point to any issue with the library.

nvd05 commented 1 year ago

Thanks for the IOCTL, as Windows uses it to delete files.

Can you please tell me where I can ask questions about Windows and SMB? The thing is that I have been looking at SMB documentation (looking, not reading, i.e. I know the logic very superficially) and you know the logic completely, so you can help and tell me where to look for a solution or problem. The forums have a very limited number of people who know SMB and what it is in general, so the chance of getting help is much lower.

For questions about logic: SMB, Windows and so on - could you create another repository to discuss issues unrelated to your library?

TalAloni commented 1 year ago

For questions about logic: SMB, Windows and so on - could you create another repository to discuss issues unrelated to your library?

No, I do not want nor have the time for additional responsibilities.