Unable to Copy Files Smaller Then 481KB to Network Driver via SMB

Ferhat B 6 Reputation points
2022-05-31T18:59:54.707+00:00

Hello

I was directed here after a topic I opened in the Microsoft Community forum.

After I opened the topic, I continued to do tests about the problem and reached the results that I will state below.

I am connecting to a hard drive connected to the router using SMB 1.0 on Windows 11 Pro (Build 22621.1). I can read files from this HDD without any problems and write files of 481KB or larger to the HDD without any problems. But I cannot write 480KB or smaller files to HDD.

At first I thought the problem was with the SRT files as I was trying to write the SRT and MKV files to the HDD. MKV files were copied without any problems. However, as a result of my experiments, I realized that I could not copy 480KB and smaller files, regardless of file type. I created different size files using the below command and noticed that the problem occurs at 480KB and below.

fsutil file createnew <filename.type> <size_bytes>

The English translation of the error message for the problem is as follows:

An unexpected error is preventing you from copying the file. If you continue to receive this error, you can use the error code to seek help with this issue:

Error 0x80070026: End of file reached.

When I connect to the same HDD via FTP, I can write files without any problems.

Thanks.
Ferhat

Windows 10 Network
Windows 10 Network
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Network: A group of devices that communicate either wirelessly or via a physical connection.
2,272 questions
0 comments No comments
{count} vote

17 answers

Sort by: Most helpful
  1. Tom Callahan 6 Reputation points
    2022-09-21T14:54:41.267+00:00

    Confirmed, 22621.521 fixes it. But why would 22H2 not include it then? 22621.521 is supposedly the same thing. At least that's what I thought. I had just turned off participation in Insiders as of the next update, but maybe I'll turn that back on to avoid losing this fix.

    1 person found this answer helpful.
    0 comments No comments

  2. Pavel Vancharin 1 Reputation point
    2022-06-02T06:47:46.807+00:00

    Hello. I support the question. I have the same problem.

    0 comments No comments

  3. Gary Nebbett 5,721 Reputation points
    2022-06-02T15:18:57.653+00:00

    Hello Ferhat & Pavel,

    A problem like this will probably require some tracing before one can form a hypothesis about the cause.

    A simple network trace, capturing the SMB interactions would be one possible starting point.

    An alternative would be to use Event Tracing for Windows to capture events from the Microsoft-Windows-SMBClient provider and perhaps the Microsoft-Windows-Kernel-File provider.

    The dilemma is that it is unlikely that you could understand the trace data yourselves but it might be a confidentiality risk to share the trace data with those you can understand it.

    If you understand the considerations and come to the conclusion that sharing trace data is acceptable, then let us know and I will suggest a command to capture some trace data.

    Gary

    0 comments No comments

  4. Pavel Vancharin 1 Reputation point
    2022-06-03T06:26:59.13+00:00

    I'm willing to share the data. Even reinstalling windows did not solve the problem.


  5. Gary Nebbett 5,721 Reputation points
    2022-06-05T12:41:24.983+00:00

    Hello All,

    Pavel shared some trace data and his problem seemed to be copying files whose size is an exact multiple of 32 kilobytes (0x8000 bytes).

    Pavel is running a beta build of Windows 11 and this version includes new kernel support for copying files (see https://learn.microsoft.com/en-us/windows-hardware/drivers/ifs/km-file-copy).

    The new kernel-mode functionality is used by the (already complex) code that implements CopyFileEx. The "old" code handled SMB v1 files differently from other files and it seems as though a bug has been introduced in this code path in the new implementation. The bug is related to end of file/stream detection.

    I am running what I believe to be the latest production release of Windows 11 (22000.708), and this version does not have the new kernel support for copying files.

    Ferhat is also using a preview version of Windows 11 (which might have the new feature) and SMB v1, so his symptoms are quite possibly caused by the same updated functionality.

    Gary

    0 comments No comments