Software⏱️ 4 min read📅 2026-06-11

How to Fix: Operation not permitted error when deleting as root

Operation not permitted error when deleting as root

Quick Answer: Run the command with elevated privileges using sudo or su, and try again.

The 'Operation not permitted' error occurs when you attempt to delete files or directories as the root user, but the system denies your request due to security restrictions. This issue affects users who have elevated privileges and are trying to perform actions that require administrative access.

This error can be frustrating, especially when dealing with large amounts of data or performing critical operations. However, by following the steps outlined in this guide, you should be able to resolve the issue and regain control over your system.

🔍 Why This Happens

  • The primary reason for this error is that the 'RECYCLER' folder is a Windows-specific feature designed to handle temporary file deletion. When you try to delete files or folders as root, the system checks for these restrictions and denies access if necessary.
  • An alternative cause could be that the 'S-1-5-21-1659004503-1644491937-725345543-1003' identifier is a unique Windows ID assigned to your user account. If this ID is associated with an existing folder or file, the system may deny deletion attempts as a security measure.

🔧 Proven Troubleshooting Steps

Using the 'Take Ownership' tool

  1. Step 1: Open the File Explorer and navigate to the affected directory.
  2. Step 2: Right-click on the directory or file you want to delete and select 'Properties'.
  3. Step 3: Click on the 'Security' tab and then click on the 'Edit' button next to 'Group or user names'.
  4. Step 4: Find your user ID in the list (usually under 'Users') and check if it has read-only access. If so, click on the user ID and select 'Modify' to change permissions.
  5. Step 5: In the 'Permissions for' section, make sure that you have the 'Delete' permission checked for the 'User' or 'Group' options. Save your changes and try deleting the file or folder again.

Using the 'runas' command

  1. Step 1: Open a Command Prompt as an administrator (right-click on the Start button and select 'Command Prompt (Admin)').
  2. Step 2: Type the following command to run the 'del' command with elevated privileges: `del /F /Q RECYCLER/S-1-5-21-1659004503-1644491937-725345543-1003/Dc39.pptx`. Replace the file path with the actual location of the file you want to delete.
  3. Step 3: Press Enter to execute the command. Be aware that this method may not work for all files or folders, and it's recommended to use the 'Take Ownership' tool for more control over permissions.

💡 Conclusion

By following these steps, you should be able to resolve the 'Operation not permitted' error when deleting as root. Remember to always exercise caution when working with elevated privileges, and consider using alternative methods like the 'Take Ownership' tool for more precise control over file permissions.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions