I have a vagrant box with Linux inside under Windows 10 (VirtualBox 5.1.4, Vagrant 1.8.5). I'm working with the Git Bash as normal user. Inside the vagrant box I cannot create a symlink:

c:/path/to/my/vagrant-project/ vagrant up + vagrant ssh
/home/vagrant/my-shared-folder/ $ ln -s /any/path/to/linux/box/folder my-symlink-name
/home/vagrant/my-shared-folder/ $ ln: creating symbolic link `my-symlink-name': Protocol error

Under Windows 7 it was working with: How do I create a link in Windows 7 home premium as a regular user?

So, has anything changed under Windows 10?

  • What happens when you issue that ln -s command? Do you get any error messages?
    – das-g
    Commented Aug 19, 2016 at 12:20
  • I just added the error message to my question. I found out, that I have to start the Git Bash as administrator to get this running. Is there a way to extend the normal user with "create symlink permissions"? Commented Aug 22, 2016 at 10:35
  • Nothing has changed in the symbolic links part of Windows 10. Commented Sep 10, 2016 at 12:44
  • For me, running as administrator was not enough, and I still got "Protocol error" when trying to create symlinks. Here was what worked: stackoverflow.com/a/60741351/470749
    – Ryan
    Commented Mar 18, 2020 at 14:18

3 Answers 3


I was struggeling a long time with the same issue. Make sure that:

  • The VirtualBox Option "SharedFoldersEnableSymlinksCreate" is active for each Folder *1)
  • You MUST run the GitBash as "Admin" user because it seems that Usermanagement in Windows just allows the symlink creation for "Admin" users *2)

    1. You can do it manually from Windows command line (setextradata via VBoxManager) or via the Vagrantfile like

      virtualbox.customize ['setextradata', :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate//vagrant", '1']  
    2. Right click on GitBash icon and run as Administrator

      German version of "Run as Administrator"

    Afterwards you should be able to log into the vagrant box and create symlinks inside shared folders which showup in Windows explorer as .symlink files.

  • To my knowledge /vagrant in "VBoxInternal2/SharedFoldersEnableSymlinksCreate//vagrant" specifies the shared folder in which symlinks are allowed. v-root specifies the root of the vm. Furthermore symlinks are activated by default for v-root.
    – velop
    Commented Aug 31, 2017 at 12:25
  • 2
    I use both these steps, and still have symlink failures when doing npm install for certain packages.
    – UpTheCreek
    Commented May 23, 2019 at 8:52

There's already thread describing How to create a Symbolic Link on Windows 10.

I'm just quickly describing it once again. First Create a junction:

junction "C:\Documents and Settings\UserName\My Documents\My Dropbox\My Games" "C:\Documents and Settings\UserName\My Documents\My Games"

Create a directory symbolic link using mlink:

mklink /D "C:\Documents and Settings\UserName\My Documents\My Dropbox\My Games" "C:\Documents and Settings\UserName\My Documents\My Games"

Security settings to create a symbolic link can be granted here:

Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\

You can also download the junction and create by using the commands.

  • this doesn't work for symlinks as described above Commented Aug 22, 2016 at 9:08

If the symbolic links are created in the host (Windows) operating system using mklink with option /d and relative paths, then they are synced into the guest machine, also while running vagrant without admin privileges or any extra rights.

mklink /D somelink ..\..\some\relative\path

Vagrant: 1.9.1, VirtualBox: 5.0.32

PS: mklink still requires admin privileges

  • "This is not a solution to the original question" - If it is not an answer to the question that was asked, then why are you submitting it as an answer, to the question that was asked? Please take into considering that commentary should never be submitted as an answer.
    – Ramhound
    Commented Jan 24, 2017 at 15:01
  • I wouldn't have known it was an answer to this question, since you literally indicated, it wasn't an answer to the question.
    – Ramhound
    Commented Jan 25, 2017 at 16:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .