'Getting "NoPermissions (FileSystemError): Error: EPERM: operation not permitted" when trying to save/create file on Visual Studio Code
I uploaded "mynewfolder" to Visual Studio Code, but when I do "New File" and write "index.html" under that I get this message:
Unable to write file (NoPermissions (FileSystemError): Error: EPERM: operation not permitted, open 'c:\Users\Projects\MyFirstPage\index.html')
I tried several times and still get the same error message.
Can anyone tell me what's going on?
Solution 1:[1]
I also meet this problem, now the problem has been solved. Please restart your PC and run your VSCODE as Administrator.
Solution 2:[2]
Just Run your VSCODE as Administrator.
Solution 3:[3]
I found if you shut down VS Code, go to c:\Users[you] and delete the folder .vscode (it may be hidden). Restart VS Code; you will be able to install extensions without a problem.
Solution 4:[4]
check your file permission privilege it should be on read and write.may be the hidden repositories in the folder check and delete it
Solution 5:[5]
The solution that worked for me is as follows (this works for Windows OS)
- Search for VSCode in the taskbar
- Right Click on VSCode and left click on "Open File Location"
File Explorer will open and Visual Studio Code will be shown
- Right Click on Visual Studio Code and select Properties
- A window will pop up displaying "Security, Details, Previous Versions, General, Shortcut and Compatibility" tabs
- Press on "Shortcut"
- Click "Advanced..."
- Another window will pop up display 2 tick boxes and select the box "Run as administrator"
- Click on OK
- Click on Apply / OK
- Open VSCode
The program will automatically run as Administrator.
If you have encounter any problems, do not hesistate to comment.
Solution 6:[6]
Just "right click" on VS code app, go to "properties", then go to "shortcut", then go to "advanced" and tick on "run as administrator", click "apply" and open the VS code. This worked for me.
Solution 7:[7]
You can click right on this folder, choose Give access to, press specific people and delete all but not the Owner. It worked for me!
Solution 8:[8]
This worked all for me:-
- Solution: On VS code icon right click and open run as administration
- Solution:- Go to folder and give Full control to folder. enter image description here
Solution 9:[9]
Running the visual Studio Code IDE with full authorization
run as administrator
will give permission to create a file in a folder. It worked in my case.
Solution 10:[10]
It works for me,
RESTART pc then RUN visual studio code as ADMIN, finally open the project FOLDER
Solution 11:[11]
DISABLE your Antivirus and then RETRY creating the file worked fine for me.
Solution 12:[12]
Restart your system, if the problem is not solved then Run VSCODE as Administrator. This worked for me.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow

