Can you share some Vagrantfile to test?

On Fri, Mar 6, 2015 at 5:33 AM, Lance Mattson <[email protected]> wrote:
> I have a Centos PHP stacking running on VirtualBox with Vagrant.  My host OS
> is Mac OS X.  I am able to get my development site up and running just fine,
> but I am not able to figure out to change permissions within the NFS synced
> folders.  Because of this, Apache is not able to write any files to the
> shared folders within Virtual Box.  I need this so Apache can write log
> files, cache files, upload images, etc.  I have looked all over the web for
> solutions, but none of them have worked for me thus far.  A lot of the
> solutions out there are to update my VagrantFile to include mounted options,
> but have had no luck with any of them.
>
> For example: here is my initial VagrantFile synced folder section:
>
> sync_owner = !folder['sync_owner'].nil? ? folder['sync_owner'] : 'www-data'
> sync_group = !folder['sync_group'].nil? ? folder['sync_group'] : 'www-data'
>
>       if folder['sync_type'] == 'nfs'
>         if Vagrant.has_plugin?('vagrant-bindfs')
>           config.vm.synced_folder "#{folder['source']}",
> "/mnt/vagrant-#{i}", id: "#{i}", type: 'nfs'
>           config.bindfs.bind_folder "/mnt/vagrant-#{i}",
> "#{folder['target']}", user: sync_owner, group: sync_group, mount_options:
> ["dmode=777,fmode=777"]
>         else
>           config.vm.synced_folder "#{folder['source']}",
> "#{folder['target']}", id: "#{i}", type: 'nfs'
>         end
>
>
> I tried things like:
>
> config.vm.synced_folder "#{folder['source']}", "/mnt/vagrant-#{i}", id:
> "#{i}", type: 'nfs, :nfs => { :mount_options => ["dmode=777","fmode=777"] }
>
> or
>
> config.bindfs.bind_folder "/mnt/vagrant-#{i}", "#{folder['target']}", user:
> sync_owner, group: sync_group, mount_options: ["dmode=777,fmode=777"]
>
> But it doesnt work.  I've also tried changing my apache user to "vagrant",
> but that didnt work either.
>
> I must be missing something simple, but cant for the life of me figure it
> out.  I'd appreciate any help!
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to