Perhaps a stupid observation, but how can you sync a pair of folders that are read only?

On 8/20/18 12:34 AM, [email protected] wrote:
Hi,

I'm trying to setup a read-only shared folder using vagrant(2.12)  vmware_desktop (1.0.4) on MacOS (10.13.6) with Vmware Fusion (10.0.1.3).  The base box I'm using is bento/ubuntu16.04


Dcos and examples led me to believe that the following would do the trick

|
  config.vm.synced_folder "../../stuff","/vagrant_stuff",:mount_options =>["ro"]
|

This reuslted in the mount remaining RW.

Looking at the debug logs, the option is passeded in correctly, the vmrun command is issued to setup the mount ...

|
 INFO guest:Executecapability:mount_vmware_shared_folder [#<Vagrant::Machine: default (HashiCorp::VagrantVMwareDesktop::Provider)>, "-stuff", "/vargrant_stuff", {:mount_options=>["ro"], :guestpath=>"/vargrant_stuff", :hostpath=>"/path_to_stuff/stuff", :disabled=>false, :__vagrantfile=>true, :owner=>"vagrant", :group=>"vagrant"}] (ubuntu)
|


|
 INFO subprocess:Startingprocess:["/Applications/VMware Fusion.app/Contents/Library/vmrun","setSharedFolderState","/path_to_vagrantfile/.vagrant/machines/default/vmware_desktop/aaeb092d-dba2-4adf-b67f-2d314f42421d/default.vmx","-vagrant_stuff","/path_to_stuff/stuff/","writable"]
|

but the bind mount command is not getting the RO option.

|
 INFO ssh:Execute:mount --bind '/mnt/vagrant-mounts/1000-1000/-stuff''/vagrant_stuff'(sudo=true)
|

Is there a way to either pass in the readonly-ness into the syned_folder subsystem or to pass in flags into the bind mount?

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/620c0013-9712-432b-a0d4-7e814bcdd438%40googlegroups.com <https://groups.google.com/d/msgid/vagrant-up/620c0013-9712-432b-a0d4-7e814bcdd438%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
In theory, there is no difference between theory and practice.
In practice, there is.  .... Yogi Berra

--
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/cf889b5b-7342-d894-9735-618fcc579fce%40meetinghouse.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to