Error code 36 on macOS Finder usually appears when you try to copy, move, or delete files, and it means the Finder couldn’t complete the operation due to a problem reading or writing the file’s metadata. The fix typically involves repairing disk permissions, clearing the problematic file’s extended attributes, or using a different copy method. Below is a step-by-step guide to resolve it, along with background on why it happens and how to avoid it in the future.
What Causes Error Code 36?
Error code 36 is a legacy macOS error that signals an unexpected end of file or a problem with the file’s resource fork or extended attributes. In modern macOS, it most often occurs when copying files from or to an external drive, a network volume, or a cloud-synced folder. The error message usually reads: “The Finder can’t complete the operation because some data in [filename] can’t be read or written. (Error code -36)�
Common triggers include:
- Corrupted or incomplete downloads (especially from browsers or email attachments).
- Files with extended attributes (like quarantine flags or custom icons) that the destination filesystem doesn’t support.
- Faulty external drives with failing sectors or improper ejection.
- Network interruptions when copying to a NAS or SMB share.
- Spotlight indexing or antivirus software interfering with file access.
Quick Fix: Use the Terminal to Remove Extended Attributes
The most direct solution is to remove the file’s extended attributes using the xattr command. Open Terminal (in /Applications/Utilities) and run:
- Type
xattr -c /path/to/file(replace with the actual file path). You can drag the file into the Terminal window to insert its path automatically. - Press Return, then try the copy or move again.
- If the error persists, the file may have a corrupt resource fork. Use
cp -R /source /destinationto copy it without the resource fork.
For multiple files, use xattr -cr /path/to/folder to clear attributes recursively. This is safe for most files, but be aware it removes quarantine flags (the “Open Anyway� warning) and custom icons.
Repair Disk Permissions and the Disk Itself
If the error affects many files, the disk may have permission or directory issues. Run First Aid in Disk Utility:
- Open Disk Utility (from /Applications/Utilities).
- Select the disk or volume (not the container) in the sidebar.
- Click First Aid and then Run.
- Let it finish; it may take a while on large drives.
For older macOS versions (pre-Catalina), you could also use diskutil resetUserPermissions / in Terminal, but modern macOS handles permissions automatically. If the drive is external, try a different cable or port, and ensure it’s properly ejected before unplugging.
Use Alternative Copy Methods
Sometimes the Finder’s copy engine is the problem. Try these alternatives:
- Drag the file to a new folder while holding the Option key (to copy) or just drag to move.
- Use rsync in Terminal:
rsync -avh /source/ /destination/(note trailing slashes). This preserves most metadata but skips problematic attributes. - Use ditto:
ditto /source /destination– it’s built for copying and preserves resource forks. - Compress the file into a ZIP archive first, then copy the ZIP, then extract on the destination. This often bypasses the error.
Check for File Corruption or Incomplete Downloads
If the error happens on a specific file, it may be corrupted. Try opening it to see if it works. For downloads, re-download the file from the source. You can also use mdls in Terminal to inspect metadata, but the simplest test is to copy the file to a different location on the same drive – if that works, the issue is with the destination filesystem.
For files from the internet, the quarantine attribute (com.apple.quarantine) can cause issues when copying to certain filesystems. Removing it with xattr -d com.apple.quarantine /path/to/file may help, but only do this for files you trust.
Common Misconception: It’s Not Always a Permission Problem
Many users assume error 36 is a permissions issue, but it’s more often a metadata problem. Permissions errors usually show a different message (“You don’t have permission�). Error 36 is specifically about reading or writing the file’s data fork or resource fork. The resource fork is a legacy part of the HFS filesystem that stores things like custom icons and Finder labels. Modern APFS and most external drives (exFAT, FAT32) don’t support resource forks, so copying a file with one to those drives can trigger error 36. The xattr command is effective because it strips the attributes that cause the conflict.
When to Consider Reformatting the Drive
If the error persists across multiple files on an external drive, the drive’s filesystem may be corrupt. Backup any accessible data, then reformat the drive. For macOS-only use, choose APFS or Mac OS Extended (Journaled). If you need cross-platform compatibility with Windows, use exFAT – but note that exFAT doesn’t support many macOS metadata features, which can increase the chance of error 36. Reformatting erases everything, so only do this as a last resort.
Frequently Asked Questions
Will error code 36 damage my files?
No, the error itself doesn’t corrupt data. It just prevents the Finder from completing the operation. The source file usually remains intact. However, if the error is due to a failing drive, that’s a separate risk – back up important data immediately.
Why does this happen only with some files?
Because those files have extended attributes or resource forks that the destination filesystem doesn’t support. Files downloaded from the internet or created on older Macs are more likely to have these. Files from iCloud or freshly created on the same Mac usually copy fine.
Can I prevent error code 36 from happening?
Yes. Use xattr -c on files before copying to external drives, or use a copy method like rsync that handles metadata gracefully. Also, avoid copying while files are still downloading, and always eject external drives properly.
Is there a way to copy without losing metadata?
Yes, use ditto or rsync -a which preserve extended attributes and resource forks when the destination filesystem supports them. If the destination doesn’t support them (like exFAT), the metadata will be dropped anyway – that’s normal.
What if the error occurs on an internal drive?
That’s rare but can happen if the internal drive is full or has directory corruption. Run First Aid, check storage space, and try copying to a different folder. If the problem persists, boot into Recovery Mode and run Disk Utility from there.
Does this error affect Time Machine backups?
Time Machine uses its own copy engine and usually doesn’t show error 36. If you see it during a backup, it’s likely due to a file with problematic metadata – the backup may skip that file. Check the Time Machine log for details.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Antimicrobial USB Drives: Claims and Limits
- How to Enable Developer Mode on Discord
- Facebook Keeps Crashing on iOS 16? Fixes That Work
- Send Apple Pay in a Group Chat: iPhone & iPad
- Fix Cortana Not Working in Windows 11
- Fix iPhone Speaker Crackling: Step-by-Step