VirtualBox

Ticket #11900 (new defect)

Opened 10 months ago

Windows host cannot see / follow symlinks in shared folder from Linux guest

Reported by: mateodelnorte Owned by:
Priority: critical Component: shared folders
Version: VirtualBox 4.2.12 Keywords:
Cc: Guest type: Linux
Host type: Windows

Description

I'm running an ubuntu guest on a windows 7 host. I have shared folders setup and working via a Vagrant file. My shared folder has a bunch of development files in it created using the Ubuntu guest, nearly all of which I can access from the windows host.

$ ls -lah                              
total 13                                                                                  
drwxrwxrwx 1 vagrant vagrant 4096 Jun 25 14:06 ./                                         
drwxrwxrwx 1 vagrant vagrant 8192 Jun 24 19:49 ../                                        
lrwxrwxrwx 1 vagrant vagrant    0 Jun 24 19:51 brunch -> ../brunch/bin/brunch*            
lrwxrwxrwx 1 vagrant vagrant    0 Jun 24 19:49 cake -> ../coffee-script/bin/cake*         
lrwxrwxrwx 1 vagrant vagrant    0 Jun 24 19:50 cleancss -> ../clean-css/bin/cleancss*     
lrwxrwxrwx 1 vagrant vagrant    0 Jun 24 19:49 coffee -> ../coffee-script/bin/coffee*     
lrwxrwxrwx 1 vagrant vagrant    0 Jun 24 19:50 express -> ../express/bin/express*         
lrwxrwxrwx 1 vagrant vagrant    0 Jun 24 19:50 grunt -> ../grunt-cli/bin/grunt*           
lrwxrwxrwx 1 vagrant vagrant    0 Jun 24 19:50 jade -> ../jade/bin/jade*                  
lrwxrwxrwx 1 vagrant vagrant    0 Jun 24 19:50 nodemailer -> ../nodemailer/bin/nodemailer*
lrwxrwxrwx 1 vagrant vagrant    0 Jun 24 19:50 stylus -> ../stylus/bin/stylus*            
-rwxrwxrwx 1 vagrant vagrant   20 Jun 25 14:04 test*                                      
lrwxrwxrwx 1 vagrant vagrant    0 Jun 25 14:02 test2 -> test*                             
lrwxrwxrwx 1 vagrant vagrant    0 Jun 25 14:05 test3 -> ../brunch/bin/brunch*             
lrwxrwxrwx 1 vagrant vagrant    0 Jun 24 19:50 uglifyjs -> ../uglify-js/bin/uglifyjs*     
vagrant@mwalters:~/development/clp-web/node_modules/.bin$                                                                                                 

What's shown above (ls -lah run on Ubuntu guest) -

  1. 'test' file, created on Ubuntu guest is visible on Windows 7 host
  2. 'test2' symlink to 'test', created on Ubuntu guest is visible on Windows 7 host
  3. 'test3' symlink to file in another directory, created on Ubuntu guest is *not* visible on Windows 7 host (nor are any of the others which follow the same pattern).
$ ls -lah                                                                  
ls: brunch: No such file or directory                                      
ls: cake: No such file or directory                                        
ls: cleancss: No such file or directory                                    
ls: coffee: No such file or directory                                      
ls: express: No such file or directory                                     
ls: grunt: No such file or directory                                       
ls: jade: No such file or directory                                        
ls: nodemailer: No such file or directory                                  
ls: stylus: No such file or directory                                      
ls: test3: No such file or directory                                       
ls: uglifyjs: No such file or directory                                    
total 7.0k                                                                 
drwxr-xr-x   15 mwalters Administ     4.0k Jun 25 10:06 ./                 
drwxr-xr-x   37 mwalters Administ     8.0k Jun 24 15:50 ../                
-rwxr-xr-x    1 mwalters Administ       20 Jun 25 10:04 test*              
-rwxr-xr-x    1 mwalters Administ       20 Jun 25 10:04 test2*                                                                             

What's shown above (ls -lah run on Windows 7 host) -

Notice none of the files are recognized as symlinks. test2 is a symlink to test and all of the other files, including test3, are symlinks to files in other directories. None of them are registering or followable from the Windows host.

Here is a copy of my Vagrant file:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "precise32"
  config.vm.box_url = "removed to allow me to post"

  # Create a forwarded port mapping which allows access to a specific port
  # within the machine from a port on the host machine. In the example below,
  # accessing "localhost:8080" will access port 80 on the guest machine.
  config.vm.network :forwarded_port, guest: 9983, host: 9983

  config.vm.hostname = "#{ENV['USERNAME']}.dev"

  # Create a private network, which allows host-only access to the machine
  # using a specific IP.
  config.vm.network :private_network, ip: "192.168.33.10"

  # Create a public network, which generally matched to bridged network.
  # Bridged networks make the machine appear as another physical device on
  # your network.
  config.vm.network :public_network

  # Share an additional folder to the guest VM. The first argument is
  # the path on the host to the actual folder. The second argument is
  # the path on the guest to mount the folder. And the optional third
  # argument is a set of non-required options.
  config.vm.synced_folder "../../", "/home/vagrant/development"


  # Provider-specific configuration so you can fine-tune various
  # backing providers for Vagrant. These expose provider-specific options.
  # Example for VirtualBox:
  #
  config.vm.provider :virtualbox do |vb|
  #   # Don't boot with headless mode
  #   vb.gui = true
  #
  #   # Use VBoxManage to customize the VM. For example to change memory:
    vb.customize ["modifyvm", :id, "--cpus", "8"]
    vb.customize ["modifyvm", :id, "--memory", "12288", "--ioapic", "on"]
    vb.customize ['storagectl', :id, '--name', 'SATA Controller', '--hostiocache', 'on' ]
    vb.customize ['setextradata', :id, 'VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root', '1' ]
    vb.customize ['setextradata', :id, 'VBoxInternal2/SharedFoldersEnableSymlinksCreate/home/vagrant/development', '1' ]
    vb.customize ['setextradata', :id, 'VBoxInternal2/SharedFoldersEnableSymlinksCreate/home/vagrant/development/*', '1' ]
    vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
    vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
  end

config.vm.provision :puppet do |puppet|
    puppet.manifests_path = "manifests"
    puppet.manifest_file  = "init.pp"
  end
end

Additional info here:  https://forums.virtualbox.org/viewtopic.php?f=6&t=56097&p=259861#p259861

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use