The format for shared folders changes across different versions of Vagrant. See Fabio's answer https://serverfault.com/questions/398414/vagrant-set-default-share-permissions
Vagrant version 1.3.1 and earlier
config.vm.share_folder "v-data", "/export", "/export",
:owner => 'vagrant',
:group => 'httpd',
:extra => 'dmode=775,fmode=775'
Vagrant version 1.3.1, 1.3.2
In Vagrant 1.3.1 and later, the extra
option has been replaced with mount_options
that expects an array.
config.vm.share_folder "v-data", "/export", "/export",
:owner => 'vagrant',
:group => 'httpd',
:mount_options => ['dmode=775', 'fmode=775']
Vagrant version >=1.3.3
In vagrant 1.3.3 it appears config.vm.share_folder
has been replaced with config.vm.synced_folder
.
config.vm.synced_folder "v-data", "/export", "/export",
:owner => 'vagrant',
:group => 'httpd',
:mount_options => ['dmode=775', 'fmode=775']
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…