SMB file corruption

This has been bugging me for years - I frequently experience file corruption when using SMB under MacOS, even up to the current version (Sonoma 14.2.1 at the moment).


I mostly use Synology systems for storage, but I corruption occurs even between MacOS systems. Here's what I've tried:


  • System updates (duh)
  • Using a different Mac (I have half a dozen)
  • Reinstalling MacOS
  • Locking SMB at different versions, playing with packet signing, encryption, etc.
  • Different networks, network adapters, WiFi and wired.
  • SMB in Windows and Linux VMs running on the same MacOS host works flawlessly. If I move the same files between the same physical hosts on the same networks, there are no problems ever.
  • rsync works flawlessly. Same hosts, networks, etc.
  • scp (file copy over ssh) works flawlessly. Same hosts, networks, etc.
  • File syncing protocols like Google Drive, OneDrive, Dropbox, Synology Drive, etc., work flawlessly. Same networks and, in the case of Synology, same hosts.
  • I seem to be able to consistently reproduce the problem with certain files (same mismatched SHA result after multiple transfers). This doesn't seem to be caching-related as I can do it with very large files that take several minutes to transfer. I've gotten the same results several times in a row.


About the only thing I haven't tried is building Samba on MacOS and trying to somehow force that instead of Apple's internal SMB stack.


There are tons of reports all over the Internet regarding SMB issues on MacOS systems.


I know it's not unique to me, and it doesn't seem to be a priority for Apple to fix even though this is a business-critical issue. I wind up using scp and rsync for all manual file transfers, and that's an annoying pain.


Perhaps if enough people pile on Apple might one day pay attention and resolve this.

iMac 27″

Posted on Jan 15, 2024 10:40 AM

Reply
3 replies

Jan 15, 2024 11:03 AM in response to Erik_C

Erik_C wrote:

• This has been bugging me for years - I frequently experience file corruption when using SMB under MacOS, even up to the current version (Sonoma 14.2.1 at the moment).

Isn't there some saying about doing the same thing over and over again and expecting a different result?

About the only thing I haven't tried is building Samba on MacOS and trying to somehow force that instead of Apple's internal SMB stack.

That won't work. macOS is a very complex operating system. There is no evidence that there is any problem with the SMB networking logic. But the network file system architecture, file system architecture, and Finder - totally different story. So if you just swap out one part that may not have a problem, it is unlikely to have any effect.


Plus, what you describe would be, at best, extremely difficult, if not impossible. You are welcome to try, but what do you hope to gain?

I know it's not unique to me, and it doesn't seem to be a priority for Apple to fix even though this is a business-critical issue. I wind up using scp and rsync for all manual file transfers, and that's an annoying pain.

But it works. There are some 3rd party SMB clients, I think Transmit is one, but they function much like standard file copying. You aren't likely to get Finder integration, and if you do, you are likely to experience the same bugs.


One thing you can do is just remember that it doesn't work. If you treat Apple's SMB like scp, it will be pretty reliable. That means using it only for copying from or to the server. Never, never try to open a file on the server. If you must use Finder, don't dawdle. Don't use QuickLook. Find your file, copy it to the Desktop and close that Window. Repeat the process in reverse after you've made your changes.


Jan 16, 2024 2:10 PM in response to Erik_C

And the moral of the story is, if you read more closely, you might find that you have completely misinterpreted what someone is trying to say. Additionally, if you respond with a polite follow-up or request for clarification, you'll get much better results than with insults. Don't even get me started with a Steve Jobs reference for the ASC Bingo Game.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

SMB file corruption

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.