Vagrant rsync-auto 似乎没有在 Mac 上的 VM 上更新文件

Max*_*ost 6 macos rsync vagrant

我在 Windows 上使用 Vagrant 一段时间了,rsync-auto 没有出现任何问题。尝试在 MacBook Air 上设置我的盒子,命令没有错误,但该文件夹似乎没有使用新文件进行更新。这是怎么回事?

这是我在 Vagrantfile 中的设置:

config.vm.synced_folder "/Users/<username>/<path>/<to>/<dir>", 
  "/var/www/html/<dir>", type: "rsync", rsync__exclude: ".git/",
  owner: "root", group: "root"
Run Code Online (Sandbox Code Playgroud)

当我通过 SSH 连接到虚拟机时,我看到文件的修改日期从未改变。

输出vagrant rsync-auto

$ vagrant rsync-auto
==> default: Doing an initial rsync...
==> default: Rsyncing folder: /Users/<username>/<path>/<to>/<dir>/ => /var/www/html/<dir>
==> default:   - Exclude: [".vagrant/", ".git/"]
==> default: Watching: /Users/<username>/<path>/<to>/<dir>
D, [2014-09-19T15:09:36.087365 #38613] DEBUG -- : Adapter: considering TCP ...
D, [2014-09-19T15:09:36.087457 #38613] DEBUG -- : Adapter: considering polling ...
D, [2014-09-19T15:09:36.087532 #38613] DEBUG -- : Adapter: considering optimized backend...
Run Code Online (Sandbox Code Playgroud)

谢谢你尽你所能的帮助。

Max*_*ost 3

不用介意。我想到了。

我的 /var/www/html 目录只能由 root 写入,因此无法进行任何更改。将权限更改为 777(这是一个虚拟机,所以我不太关心),它终于可以工作了。当权限。