Permissions 流浪许可问题

Permissions 流浪许可问题,permissions,vagrant,chmod,Permissions,Vagrant,Chmod,这是我的流浪汉档案。问题出在`var/www内部。我无法使用下面的配置设置特定文件夹的权限。例如,var/www/sample文件夹必须设置为777权限。但我不能这样做,既不能使用root帐户,也不能使用流浪帐户。尝试将moun的类型更改为rsync。还是一样的问题 # -*- mode: ruby -*- # vi: set ft=ruby : # check and install required Vagrant plugins required_plugins = ["vagrant-

这是我的流浪汉档案。问题出在`var/www内部。我无法使用下面的配置设置特定文件夹的权限。例如,var/www/sample文件夹必须设置为777权限。但我不能这样做,既不能使用root帐户,也不能使用流浪帐户。尝试将moun的类型更改为rsync。还是一样的问题

# -*- mode: ruby -*-
# vi: set ft=ruby :

# check and install required Vagrant plugins
required_plugins = ["vagrant-hostmanager"]
required_plugins.each do |plugin|
    if Vagrant.has_plugin?(plugin) then
        system "echo OK: #{plugin} already installed"
    else
        system "echo Not installed required plugin: #{plugin} ..."
        system "vagrant plugin install #{plugin}"
    end
end

Vagrant.configure(2) do |config|
  config.vm.box = "ubuntu/trusty64"

  config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"

  config.vm.provision :shell,
    keep_color: true,
    path: "provision/setup.sh"

  config.vm.box_check_update = true

  config.vm.network "private_network", ip: "192.168.56.10"

  config.vm.synced_folder '.', '/vagrant', disabled: true
  config.vm.synced_folder "./", "/var/www", create: true, group: "vagrant", owner: "vagrant", type: "rsync"

   config.vm.provider "virtualbox" do |vb|
     vb.name = "Web Server"
     vb.gui = false
     vb.memory = "512"
   end


end
我做错了什么?

换成

config.vm.synced_folder "./", "/var/www", group: "vagrant", owner: "vagrant", mount_options: ["dmode=777, fmode=664"]
这使得目录为777模式,文件为664-您可以根据需要调整这些值