10

when trying to use NFS with Vagrant to sync folders, on my vagrant I see the permissions as user 501 group dialout.

I fixed the issue disabling NFS and specifying a user and group manually in Vagrant file. I would like to use NFS though.

Here is my VagrantFile

$BOX = "ubuntu/xenial64"
$IP = "10.0.0.10"
$MEMORY = ENV.has_key?('VM_MEMORY') ? ENV['VM_MEMORY'] : "1024"
$CPUS = ENV.has_key?('VM_CPUS') ? ENV['VM_CPUS'] : "1"

Vagrant.configure("2") do |config|
  config.vm.hostname = "name.dev"
  config.vm.box = $BOX
  config.vm.network :private_network, ip: $IP
  config.ssh.forward_agent = true

  config.vm.synced_folder ".", "/var/www/name/current", type: "nfs"

  config.vm.provider "virtualbox" do |v|
    v.name = "name
    v.customize ["modifyvm", :id, "--cpuexecutioncap", "100"]
    v.customize ["modifyvm", :id, "--memory", $MEMORY]
    v.customize ["modifyvm", :id, "--cpus", $CPUS]
  end
end

I've tried nfsbind but it seems that this require absolute path which I would rather avoid. Any tips?

Thanks

vicdup
  • 151
  • 5
  • https://github.com/hashicorp/vagrant/issues/10609 - I think that vagrant has a bug in how they generate the NFS config; ultimately you need to maproot so that you can get root in the share – Ben Creasy Feb 10 '19 at 20:06

0 Answers0