From 9e780606f477cb3cbdbf468899a26b15d1589a22 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 6 Jul 2011 00:07:36 -0700 Subject: [PATCH] Note that NFS doesn't support owner/group settings --- lib/vagrant/config/vm.rb | 9 ++++++++- templates/locales/en.yml | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/vagrant/config/vm.rb b/lib/vagrant/config/vm.rb index 278f126ca..cd6de43b0 100644 --- a/lib/vagrant/config/vm.rb +++ b/lib/vagrant/config/vm.rb @@ -46,7 +46,8 @@ module Vagrant :guestpath => guestpath, :hostpath => hostpath, :owner => nil, - :group => nil + :group => nil, + :nfs => false }.merge(opts || {}) end @@ -117,6 +118,12 @@ module Vagrant :name => name, :path => options[:hostpath])) end + + if options[:nfs] && (options[:owner] || options[:group]) + # Owner/group don't work with NFS + errors.add(I18n.t("vagrant.config.vm.shared_folder_nfs_owner_group", + :name => name)) + end end # Each provisioner can validate itself diff --git a/templates/locales/en.yml b/templates/locales/en.yml index 2199d3c15..f51007576 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -173,6 +173,8 @@ en: box_missing: "A box must be specified." box_not_found: "The box '%{name}' could not be found." shared_folder_hostpath_missing: "Shared folder host path for '%{name}' doesn't exist: %{path}" + shared_folder_nfs_owner_group: |- + Shared folder '%{name}': NFS does not support the owner/group settings. provisioner_chef_server_changed: "The provisioner 'chef_server' is now 'chef_client'" provisioner_not_found: "The provisioner '%{shortcut}' doesn't exist." provisioner_invalid_class: "The provisioner '%{shortcut}' must inherit from `Vagrant::Provisioners::Base`."