How to Fix ERROR_NOT_ALLOWED_ON_SYSTEM_FILE

Make sure you are logged in as an administrator

Reading time icon 3 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

How to fix ERROR_NOT_ALLOWED_ON_SYSTEM_FILE

The ERROR_NOT_ALLOWED_ON_SYSTEM_FILE has the value of 313 (0x139) and comes with the message Operation is not allowed on a file system internal file.ย It is a Windows error code that indicates an operation is not permitted on a system file.

This error typically occurs when you try to perform actions like deleting, modifying, or moving a system file that is protected by the operating system. To get around this issue, first, make sure you have administrative permissions. Also, check if the file is used by any other process at that moment.

How do I fix ERROR_NOT_ALLOWED_ON_SYSTEM_FILE?

1. Perform the action after booting Windows in Safe Mode

  1. Click on theย Startย menu on your taskbar, then select theย Powerย icon.
  2. Press and hold theย Shiftย key on your keyboard, then click onย Restart.
  3. Once youโ€™re redirected to the options screen, selectย Troubleshoot.start menu troubleshoot options
  4. Click onย Advanced options and selectย Startup Settings.troubleshoot startup settings
  5. Click on theย Restartย button.
  6. After your PC restarts, on the next screen, choose the appropriate option by pressing the number 4 on your keyboard. Up next, the computer will enter the Safe Mode environment.
  7. Now, try to perform the action that triggered the ERROR_NOT_ALLOWED_ON_SYSTEM_FILE.

We also have a complete guide on how to boot in Safe Mode that provides additional information.

2. Take ownership of the file

  1. Click the Start button, type cmd and select Run as administrator from the results.
  2. Now, type one of the following 2 commands and replace the path with the actual path of your file:
    • takeown /f "C:\path\to\file"
      icacls "C:\path\to\file" /grant administrators:F
  3. Try to perform the action on the system file that caused the error.

If you require additional information, you can find it in our guide on how to take ownership of a file or folder in Windows 11.

3. Disable System Protection temporarily

Note icon NOTE
The system protection is very important for the security of your system. Make sure to activate it again after performing your operation.
  1. Press Win + R, type sysdm.cpl and press Enter.
  2. In the System Properties window, go to the System Protection tab.
  3. Under the Protection Settings section, select the drive for which you want to disable system protection (usually the C: drive) and click on Configure below.
  4. In the new window, select the option Disable system protection.
  5. Click Apply, then OK to confirm your changes.
  6. You will receive a confirmation message. Click Yes to disable system protection.
  7. Now, try to perform the operation you tried before confronting with the ERROR_NOT_ALLOWED_ON_SYSTEM_FILE.

If the ERROR_NOT_ALLOWED_ON_SYSTEM_FILE is caused by an app requesting permission, first, make sure that it’s a legitimate app. If so, you can try running as administrator to avoid this problem.

We hope that our solutions helped you fix the ERROR_NOT_ALLOWED_ON_SYSTEM_FILE issue on Windows.

For any further questions or suggestions use the comments section below and let us know.

More about the topics: error, System Errors

User forum

0 messages