Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NFS mount fails when path has spaces on guest #7540

Closed
paliarush opened this issue Jul 1, 2016 · 1 comment · Fixed by #7605
Closed

NFS mount fails when path has spaces on guest #7540

paliarush opened this issue Jul 1, 2016 · 1 comment · Fixed by #7605

Comments

@paliarush
Copy link

If path on guest contains spaces, directory is not mounted correctly.
Arbitrary directory name cannot be used on guest in my case since to have symlinks working on guest when they are created on host, paths should be identical on guest and on host. In case if host has spaces in path, guest path should also be with spaces.

Mount command looks as follows and obviously quotes are missing around path on guest:
mount -o 'vers=3,udp' 192.168.10.1:'/some_path/directory with spaces/subdirectory' /some_path/directory with spaces/subdirectory

Vagrant version

1.8.1

Host operating system

OSX 10.11.5

Guest operating system

Ubuntu 14.04

Vagrantfile

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

Vagrant.configure(2) do |config|
  config.vm.box = "ubuntu/trusty64"
  config.vm.synced_folder '.', '/vagrant', disabled: true
  config.vm.synced_folder '.', '/vagrant/directory with spaces/subdirectory', type: "nfs", create: true
  config.vm.network "private_network", type: "dhcp"
end

Debug output

https://gist.github.com/paliarush/2ec4ee104c57b8b9d5eff85d749eb620

Expected behavior

NFS shared folder should be mounted correctly even if path on guest contains spaces. Directory should be available on guest as /vagrant/directory with spaces/subdirectory

Actual behavior

The rest of the path after space is ignored and directory is mounted as /vagrant/directory

Steps to reproduce

  1. Use provided Vagrantfile, vagrant up
  2. vagrant ssh and look at mounted directory, should be /vagrant/directory with spaces/subdirectory, not /vagrant/directory

References

@paliarush
Copy link
Author

@sethvargo thanks for fixing this issue

@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
@ghost ghost unassigned sethvargo Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants