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

Discussion in 'Windows Virtual Machine' started by berlindave, Nov 21, 2025 at 12:30 PM.

  1. berlindave

    berlindave

    Messages:
    2
    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!

     
  2. berlindave

    berlindave

    Messages:
    2
    Ok, I found the solution: It was a stupid mistake. I tried to write inside the "Program files" folder. That explains the error message.
     
  3. VoidB

    VoidB Junior Member

    Messages:
    10
    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.
     
  4. preetiA1

    preetiA1

    Messages:
    1
    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.
     
  5. VoidB

    VoidB Junior Member

    Messages:
    10
    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!
     

Share This Page