Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Error code 36 when copying b/w external drives?

Error code 36 when copying b/w external drives?
Thread Tools
ShortcutToMoncton
Addicted to MacNN
Join Date: Sep 2000
Location: The Rock
Status: Offline
Reply With Quote
Mar 23, 2019, 04:00 PM
 
Hello, I have a 2018 iMac that has an external Thunderbolt JBOD enclosure with four platter WD Red drives formatted in HFS+. These drives were used with my previous 2012 iMac and contain all my media and backups.

I recently got a Thunderbolt 4-bay SSD enclosure from OWC, with a 512Gb m.2 SSD Toshiba drive formatted in AFPS. This is to serve as my primary drive for all music (which again, will be backed up to one of the platters).

My ~420gigs of music are currently on one of the external platter drives. So I start copying them over to the new SSD, but very quickly I start getting the following error with certain files, which stop the transfer:

The Finder can’t complete the operation because some data in “File name” can’t be read or written. (Error code -36)
It’s driving me bananas. I’ve run Disk utility on both drives and no issues reported. Anyone know if this is a software issue or am I looking at a drive issue?
Mankind's only chance is to harness the power of stupid.
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Mar 23, 2019, 04:44 PM
 
It's a software issue. Your drives are fine.

When files with resource forks are present on a filesystem that does not support forks (msdos mostly), macOS solves it by using two files.

file.jpg (data fork)
._file.jpg (resource fork)

As the 2nd one begins with a dot, it is invisible by default. Resource forks used to contain almost anything (and still can in theory). Today they're most likely to contain an icon preview.

When the Finder copies a file to msdos, it will split a forked file into the two files. Ideally, the Finder will merge the two back together when returning it to a modern file system. The problem happens when both variants are present in HFS+ (or APFS i assume). This condition should not occur, and the Finder cannot be certain if it's a previous copying glitch, or if the 2nd file is really an independent file. So the copy stops. But instead of actually explaining what happens, macOS only offers the cryptic error number.

Anyway, it's always an orphaned resource fork, and easily solved with the dot_clean terminal command.

Here's a good tutorial. Short version: open Terminal, type "dot_clean ", and drag the suspect folder into the terminal window. Hit return key, and you're good to go. The command is recursive by default.
     
ShortcutToMoncton  (op)
Addicted to MacNN
Join Date: Sep 2000
Location: The Rock
Status: Offline
Reply With Quote
Mar 23, 2019, 05:22 PM
 
Huh. So in this case all drives and files have only been used with MacOS. So it must be a HFS to APFS issue?
Mankind's only chance is to harness the power of stupid.
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Mar 23, 2019, 05:27 PM
 
Did any files come from a digital camera?

note: can happen when using network-mounted drives too.
     
ShortcutToMoncton  (op)
Addicted to MacNN
Join Date: Sep 2000
Location: The Rock
Status: Offline
Reply With Quote
Mar 23, 2019, 07:15 PM
 
Nope. They’re all audio files (mp3, flax, ale). They came from my old Mac mini’s SSD.
Mankind's only chance is to harness the power of stupid.
     
ShortcutToMoncton  (op)
Addicted to MacNN
Join Date: Sep 2000
Location: The Rock
Status: Offline
Reply With Quote
Mar 31, 2019, 10:01 PM
 
Ok. Either I’m doing something wrong with dot_clean (very possible), or something funky is going on. I tried running it on my source music folder (which is also on a Time Machine external backup drive, if that matters) and nothing appears to happen. I also ran it on my destination Music folder on the new SSD (you can see in the below Terminal screen), and again nothing appears to happen. Then I ran it on the entire source platter drive, not just the source folder, which took forever and returned a huge number of “Bad pathname” errors (one page of which you can see).

But once that was done, I tried copying again, and still, I’m getting the same problem—I can’t copy these .m4a files over because of an error -36. Again, this is an external platter drive that was formatted for and only ever used as an external drive on my Mac, so for me it’s weird that this would even be a problem in the first place...

The files seem otherwise fine—I can play them in iTunes perfectly, but just can’t copy them.

Terminal Screen Errors
Mankind's only chance is to harness the power of stupid.
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Mar 31, 2019, 10:16 PM
 
Those are permission errors. Your current user account probably does not own the file on that external drive. Or the files could be locked or have weird permissions. But most likely they were first saved there from a different OS version. And your user account had a different ID number.

You could run dot_clean with sudo (or from the root account - same thing). Or disable owners on the external drive: Finder -> get-info on the external volume -> Sharing & Permissions: -> [box] Ignore ownership on this volume.

You'll need to authenticate before you can check that box.

After disabling owners, you might try copying just to see if that's all it was. If you still get the error -36, dot_clean should finally work.
     
ShortcutToMoncton  (op)
Addicted to MacNN
Join Date: Sep 2000
Location: The Rock
Status: Offline
Reply With Quote
Apr 1, 2019, 08:37 PM
 
Ok—weird, that external drive doesn’t have the “ignore ownership...” option at the bottom of Get Info. My other external drives do. Any chance the designation as Time Machine Drive is causing some sort of issue?
Mankind's only chance is to harness the power of stupid.
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Apr 1, 2019, 10:04 PM
 
Sounds reasonable. The box is missing on network drives. I don't have a direct-attached TM drive to check. You could recheck from the root user account, as a TM volume should be owned by root. That would also be a good place to run dot_clean from.

You could also undesignate the drive from TM, check the box, do file maintenance, uncheck the box, then re-choose the drive. And TM should pick up where it left off.
     
Thorzdad
Moderator
Join Date: Aug 2001
Location: Nobletucky
Status: Offline
Reply With Quote
Apr 2, 2019, 07:58 AM
 
Originally Posted by reader50 View Post
Sounds reasonable. The box is missing on network drives. I don't have a direct-attached TM drive to check.
I'll just jump in here and confirm that my direct-connected TM drive does not have the "ignore ownership" checkbox. My other non-TM drive does have the checkbox.

Carry on.
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 05:53 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,