creating symbolic link: Protocol error

后端 未结 7 1040
一整个雨季
一整个雨季 2021-02-01 02:51

I have created linux (Centos) on my virtual box. When I ssh to it and I try to create symbolic link (on my shared folder with full access):

ln -s path/folder/exa         


        
7条回答
  •  星月不相逢
    2021-02-01 03:08

    Basically you need to again tell VirtualBox to enable symlinks. Here's the complete solution

    Have this in your vagrant file,

    config.vm.provider "virtualbox" do |v|
        v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/Folder_Name", "1"]
    end
    

    I recommended comment out any sync folder and let default ./(at host) synced at /vagrant(at guest). This will make sure your shared folder(Folder_Name) name is always vagrant as mentioned here https://www.vagrantup.com/docs/synced-folders/. Also, you won't face issues with ssh

    If the symlink protocol error returns after restart or still persists run

    VBoxManage setextradata "VM_Name" VBoxInternal2/SharedFoldersEnableSymlinksCreate/Folder_Name 1
    
    vagrant halt
    vagrant up
    
    vagrant ssh
    

    Usually, VBoxManagee is located at C:\Program Files\Oracle\VirtualBox\

    Verify working of symlink by going to /vagrant and running

    touch test.txt && ln -s test.txt test1.txt
    

    PS: I have tried this on Windows Home which has limited accessibility to security settings

提交回复
热议问题