Vagrant synced folder permissions

前端 未结 2 1772
情话喂你
情话喂你 2021-02-13 09:51

I have set up a synced folder in Vagrant, from my Windows host to the guest. Initially the permissions on the files were too open so I added the following mount options:

2条回答
  •  青春惊慌失措
    2021-02-13 10:34

    I was having a similar issue with folder permissions. I'm using virtualbox on Mac OSX. I added the owner and group options which fixed my issue of not being able to write to a cache directory on the server. Update to include folder and file modes.

    srv.vm.synced_folder server["synced_folder"]["src"], server["synced_folder"]["dest"], create: true, group:'vagrant', owner:'www-data', mount_options: ["dmode=775,fmode=664"]
    

提交回复
热议问题