[Solved] Unable to write file from VS Code on Mac to Windows 11 VM

Hello experts,
I'm trying to write a File from VS Code on my Mac to the Windows 11 VM. But I get the following error message:
Fehler beim Speichern von "// Comment": Datei "/Volumes/[C] Windows 11/Program Files/GBE MetaTrader 5 Terminal/MQL5/settings.json" kann nicht gespeichert werden (NoPermissions (FileSystemError): Error: EACCES: permission denied, open '/Volumes/[C] Windows 11/Program Files/GBE MetaTrader 5 Terminal/MQL5/settings.json').​

In the Sharing Settings I enabled "Share Windows". What could be the reason?
For your hints many thanks in advance!
 
Ok, I found the solution: It was a stupid mistake. I tried to write inside the "Program files" folder. That explains the error message.
 
Nice! Good to see it's solved -- nothing worse than working in VS Code and getting blocked by random VM file permissions

If anyone else hits this: make sure the macOS folder is shared in the VM settings and that VS Code isn't running with restricted permissions. Once that's sorted, writing files from Mac → Windows works clean.
 
This issue usually happens because Windows blocks edits inside **Program Files**. Just move your MQL5 folder to
`C:\Users\<yourname>\Documents\MQL5`
and VS Code should save normally.
 
This issue usually happens because Windows blocks edits inside **Program Files**. Just move your MQL5 folder to
`C:\Users\<yourname>\Documents\MQL5`
and VS Code should save normally.
Thanks for the tip! I moved the MQL5 folder to C:\Users\<yourname>\Documents\MQL5 as suggested, and now VS Code saves without any issues. Really appreciate the clear explanation!
 
Back
Top