0X00000052

ERROR_CANNOT_MAKE 0x00000052: Fixing a File Creation Block

Windows Errors Intermediate 👁 0 views 📅 May 27, 2026

This error means Windows couldn't create a file or folder. Usually a permissions or disk issue. Here's how to nail it down fast.

Quick answer

Run icacls <target folder> /grant "%USERNAME%":(F) /T in an admin command prompt. If that doesn't work, check disk errors with chkdsk /f, then look for antivirus blocking it.

You're working on something, trying to save a file or create a new folder, and Windows throws ERROR_CANNOT_MAKE (0x00000052). The exact message is 'The directory or file cannot be created.' It's a real showstopper. I've seen this pop up when someone's moving files to a network share, saving a PDF from a browser, or even just unzipping an archive. The root cause is almost always one of three things: your user account doesn't have the right permissions (most common), the disk has a corruption that's blocking write operations, or a third-party program (like an antivirus or backup tool) has locked the file or folder. Let's fix it.

Step-by-step fix

1. Check and fix permissions

This is the first place I look. If you're trying to write to a folder that Windows thinks you don't own, you get this error. Open a command prompt as Administrator (right-click Start > Terminal Admin). Navigate to the folder that's giving you trouble. Then run:

icacls . /grant "%USERNAME%":(F) /T

Replace . with the actual folder path if you didn't cd into it. The /T flag applies to all subfolders and files. This grants you full control. If you're on a network share, you'll need the share-level permissions to match—talk to your admin.

2. Run a disk check

If permissions look correct but it's still failing, disk corruption could be the culprit. Run this in an admin command prompt:

chkdsk /f C:

Swap C: for the right drive letter. It'll schedule a check on next reboot. Restart the machine and let it run. I had a client last month whose whole print queue died because of a bad sector on the disk. Chkdsk found it, marked it bad, and the error went away.

3. Disable antivirus temporarily

Some aggressive antivirus tools lock files as part of real-time scanning. Turn off your antivirus for a minute and try creating the file again. If it works, add an exclusion for that folder in your antivirus settings. Windows Defender usually plays nice, but third-party ones like McAfee, Norton, or Webroot can cause this.

4. Clear file locks with handle or Process Explorer

Another process might have the file open, even if it looks like it doesn't. Download Sysinternals Process Explorer from Microsoft. Run it as admin, hit Ctrl+F, and search for the file or folder name. It'll show you what process has a handle on it. Kill that process (right-click > Kill Process) and try again. This fixed a case where a stuck Adobe Acrobat update was blocking a PDF save.

Alternative fixes if the main one fails

  • Take ownership of the folder: Right-click the folder > Properties > Security > Advanced > Change owner to your user account. Check 'Replace owner on subcontainers and objects'. Apply, then repeat the icacls grant command.
  • Check disk space: Yeah, it's basic, but I've seen people chase permissions for an hour when the drive was just full. Right-click the drive in Explorer > Properties.
  • Run SFC and DISM: System file corruption can mess with file creation. Run sfc /scannow in an admin cmd, then DISM /Online /Cleanup-Image /RestoreHealth.
  • Disable file indexing: Right-click the folder > Properties > Advanced > Uncheck 'Allow files to have contents indexed'. This can cause permission-like errors on some systems. Apply to subfolders.

Prevention tip

To avoid this in the future, stop working out of system-protected folders like C:\Program Files or C:\Windows. Save your work to your user folder (C:\Users\YourName). It's designed for read/write access without permissions fights. Also, run a chkdsk quarterly on any drive that's more than a year old. Disk errors compound over time.

Was this solution helpful?