Vagrant: how to set owner to synced/shared folders when this owner is created in the provisioning phase

后端 未结 1 1642
我在风中等你
我在风中等你 2021-01-13 03:57

Vagrantfile (relevant parts)

  config.vm.provision :chef_solo do |chef|
    chef.add_recipe \"yum\"
    # various recipes..
    # in one of these i create th         


        
相关标签:
1条回答
  • 2021-01-13 04:45

    I wasn't aware you could set the owner on a folder like that... is it in the docs?

    What I would do is mount the folder and then in the provisioning step set the owner and permissions that way... if the folder doesn't exist until provisioning that I would mount a folder that does exist but create a symlink to it from the mounted folder in the provisioning step.

    I also normally create an AFP or Samba server share and access folders on the server that way... its a bit more setup but a lot more powerful than just mounting a shared folder through Vagrant.

    0 讨论(0)
提交回复
热议问题