4 Ways to Fix Mac Error Code 36

Macos Error Code 36 Header

There are only a few macOS error messages that are as notorious as error code 36. Encountering it while in the middle of something important can be frustrating, to say the least, especially with a lot of often-conflicting advice online. This guide lays down five easy-to-follow methods to help you kick Mac Error Code 36 to the curb.

What Is Error Code 36 on macOS?

Error code 36 on Mac is sometimes referred to as the “cannot be read or written” error, as the full error message typically reads:

"The Finder can’t complete the operation because some data in “Filename.extension” can’t be read or written. (Error Code -36)"

Your Mac is bringing attention to the fact that it can’t read data from a source file or write data to a destination file. The error code 36 is most commonly encountered when:

  • Transferring files from an external storage device to the internal hard drive.
  • Copying files from the system drive to an external storage device.
  • Moving files to the Trash folder.

Understanding error code 36 is the first step toward its resolution.

Tip: looking for a guide on how to fix error code 43? Explore our tested and approved solutions.

What Causes Error Code 36 on Mac?

Error code 36 is usually caused by one or more of the following factors:

  • File corruption: if the file you’re trying to copy or move is corrupted, then it may lead to error code 36 popping up. This happens because your Mac is struggling to read data as it should.
  • Issues with file permissions: sometimes the permissions associated with a file or folder will prevent your Mac from performing the operation successfully.
  • Faulty storage device: both internal and external storage devices can trigger error code 36 when your Mac can’t properly communicate with them.
  • Operating system bugs: occasionally, issues with macOS itself, namely software bugs, can cause unexpected behavior and prevent read and write operations from finishing successfully.

Although these issues may sound complicated, the fixes often are not, as you’ll see.

Good to know: having trouble identifying the problem? You can discover how to use Apple Diagnostics to troubleshoot your Mac.

1. How to Fix Error Code 36 Using the “Dot_clean” Command

If you’ve ever copied files from your Mac to your external storage device, then connected the storage device to a PC running Windows or Linux, you may have noticed some odd-looking files that start with a dot, like .DS_Store. These are known as “dot files” and are usually hidden on a Mac, storing custom attributes, like the position of icons or background image configurations.

Because of their Mac-specific nature, dot files sometimes become corrupted when a single storage device is accessed from multiple operating systems. Fortunately, macOS comes with a handy command-line utility, called “dot_clean,” that can recursively merge them with their corresponding native files. To use the dot_clean command, follow the steps below:

  1. Open the “Terminal app.” You can find it in “Applications -> Utilities.”
Macos Terminal Highlighted
  1. Enter the following command to list all connected volumes: ls /Volumes
  2. Remember the name of the storage device you’re having trouble with. For example, your system drive is usually called “Macintosh HD.”
  3. Enter the following command to run the dot_clean command on your storage device: sudo dot_clean /Volume/Drive-name
  4. To scan your system drive, enter: sudo dot_clean /Volumes/Macintosh\ HD. Then, enter your admin password and wait for the dot_clean command to finish its job.
Dot Clean Command Terminal

Important: while the Terminal can be a powerful tool, it’s also capable of making system-level changes. Always double-check the commands you enter to avoid unintended consequences.

2. How to Fix Error Code 36 by Reviewing Read/Write Permissions

The macOS operating system is fundamentally a Unix-based operating system, and as such, it utilizes a similar permissions model to ensure the security of your files. Essentially, this model regulates who can read, write, or execute every file and folder on your system. To remedy error code 36, check whether you have the necessary read/write permission for the file or folder you’re having trouble with:

  1. Launch Finder and locate the file or folder that’s triggering error code 36.
  2. Right-click the file or folder and click the “Get Info” option.
Get Info Option Macos
  1. Expand the “Sharing & Permissions” section at the bottom.
  2. Take a look at the privileges next to your username and make sure they’re set to “Read & Write.” If they’re not, continue.
  3. Click the lock icon at the bottom right of the window, and enter your password when prompted.
Info Tab Lock
  1. Open the pop-up menu in the “Privilege” column, then choose the desired privilege setting.
Info Tab Change Permissions

Tip: you can always revert any changes made to your file and folder permissions by clicking the three dots at the bottom of the Info window and choosing the “Revert changes” option.

How to Perform Read/Write Operations Using Terminal

Sometimes the macOS Finder will face hiccups like error code 36 while deleting, copying, or moving files or folders, but you can bypass these by performing the operations directly from Terminal. Just know that Terminal commands require a bit of caution, as incorrect commands could have unintended consequences (but so can an incorrect click).

Use the “rm” (remove) command to delete a file or folder using Terminal:

rm unnecessary.file or rm -r unnecessary.folder

Use the “cp” (copy) command to copy a file or folder using Terminal:

cp example.file ~/Desktop or cp -r foldername ~/Desktop

Use the “mv” (move) command to move a file or folder using Terminal:

mv example.file ~/Desktop or mv -r foldername ~/Desktop

Tip: for these example commands to work, you first need to navigate to the correct folder. Do that by using the “cd” (change directory) command.

3. How to Fix Error Code 36 by Running First Aid on Your Storage Device

Both internal and external drives can occasionally experience file system issues that prevent your Mac from reading or writing data properly. That’s where the “First Aid” feature of the built-in macOS Disk Utility tool comes in, allowing you to check the filesystem of your drive for errors and fix them if possible with a few simple clicks:

  1. Launch the Disk Utility app from “Applications -> Utilities.”
Macos Terminal Highlighted 1
  1. Select the problematic storage device in the left pane.
  2. Click the “First Aid” button in the toolbar.
First Aid Macos Highlighted
  1. Confirm your decision to scan and, hopefully, fix the storage device by clicking the “Run” button.
  2. Wait for First Aid to finish.

Note: if Disk Utility fails to repair your disk and eliminate error code 36, we recommend backing up your storage device, as it could be failing.

4. How to Fix Error Code 36 by Manually Deleting .DS_Store Files

If no solution so far has helped, then you should consider manually deleting .DS_Store files from your storage device. As we’ve already explained, these files hold directory-level settings for your Mac, so they’re not really necessary. That’s good news, as they can become corrupted and cause error code 36 to appear.

Because .DS_Store files are hidden by default and not visible in Finder, even if you press Command + Shift + . to reveal hidden files, you need to jump through a few extra hoops to delete them:

  1. Launch Terminal. You can find it in “Applications -> Utilities.”
  2. Navigate to the folder you’re having trouble with using the “cd” command.
  3. Enter the following command to list all files: ls -lA
  4. Use the “rm” command to remove the .DS_Store file: rm .DS_Store
Ds Store Remove Terminal
  1. Repeat steps 2 through 4 for all other problematic folders.

Tip: you can delete all .DS_Store files on your system in one go using the following command (use it with caution): sudo find / -name ".DS_Store" -depth -exec rm {} \;

Frequently Asked Questions

What are other common error codes on macOS?

There are many error codes that can show up on macOS, each indicating a different problem. Beside error code 36, other commonly encountered error codes include error code 43 and error code 50.

Can I prevent error code 36 from happening again?

Unfortunately, there’s no guaranteed way to prevent error code 36. The best you can do is take care of your storage devices and keep your operating system updated.

Is it safe to delete .DS_Store files?

Yes, it’s generally safe to delete .DS_Store files. These files are created by macOS to store directory-specific settings, and they don’t contain any personal data.

Image credit: Pexels. All screenshots by David Morelo.

Is this post useful?
Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

David Morelo
David Morelo - Staff Writer

David Morelo is a professional content writer in the technology niche, covering everything from consumer products to emerging technologies and their cross-industry application. His interest in technology started at an early age and has only grown stronger over the years.