Mac環境での話です。
以前も一度設定してたんですが、Mac本体のディスクフルに伴ってVagrantの設定ファイル壊れたりとか色々あって、再度設定しました。
設定時にちとハマったのでメモがてら^^;
node.vm.synced_folder '.', '/var/www/app',
:create => true, :owner=> 'www-data', :group => 'www-data'
となってたのを
node.vm.synced_folder '.', '/var/www/app',
:create => true, :owner=> 'www-data', :group => 'www-data', type:"nfs"
としてnfsへ
そしたら vagrant up時にエラー
There are errors in the configuration of this machine. Please fix
the following errors and try again:
vm:
* Shared folders that have NFS enabled do not support owner/group
attributes. Host path: .
ownerとgroupはnfsにしたときは使えないってことのようだ。ってことでその指定を除外してみる。
node.vm.synced_folder '.', '/var/www/app',
:create => true, type:"nfs"
再び vagrant upするが今度は違うエラー
NFS is reporting that your urus file is invalid. Vagrant does
this check before making any changes to the file. Please correct
the issues below and execute "vagrant reload":
exports:2: path contains non-directory or non-existent components: /Users/ryuji/htdocs/NetCommons3
exports:2: no usable directories in export entry and no fallback
ぐぐってみると/etc/exportsを削除しろってことらしいので
$ sudo rm -rf /etc/exports
これで無事起動できるようになりました