Vagrant: can't get NFS working

怎甘沉沦 提交于 2019-12-04 04:22:56

Vagrant only raises this error when the owner or group is true. Try forcing it by passing nil for both these options for both synced_folder configs.

, group: nil, owner: nil

Here's the code: https://github.com/mitchellh/vagrant/blob/8655d212c327d363f8e80185705ff70bb2e97f6b/plugins/kernel_v2/config/vm.rb#L572

I've found mapping the uid/gid directly works OK. It's a little weird on the vagrant side, because they are arbitrary users/groups but apart from that it is fine.

Vagrant.configure("2") do |config|
  # ...
  config.nfs.map_uid = Process.uid
  config.nfs.map_gid = Process.gid
  config.vm.synced_folder ".",  "/vagrant", id: "vagrant-root", :nfs => true
  config.vm.synced_folder "..", "/var/www", id: "application",  :nfs => true
end
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!