Herueka! Fix for “Error: EPERM: operation not permitted”

How to (maybe) fix the EPERM error that occurs on Windows 10 when moving folders in VS Code.

Wow! It’s been 9 years since my last blog post, but this fix deserves a new one. I have been facing this EPERM issue on and off for some time, but I really needed to solve it during a major refactoring session.

I tried rebooting my dev machine, disabling all VS Code extensions and antivirus software, killing every process that might hold any of the files I tried to move, and even screaming…

The solution that worked for me involved two steps. First, I unchecked the read-only attribute for the c:\users[USERNAME].vscode folder and all its subfolders and files. Second, I opened VS Code settings and unchecked the experimental “Use Sandbox” mode that was somehow enabled.

Update: I found that switching the “Use Sandbox” mode on and off, even if it was already enabled, also solved this problem.

Trackback URL: https://codeblog.silfversparre.com/2023/06/herueka-fix-for-error-eperm-operation-not-permitted/trackback/