Vagrant 流浪汉可以';无法设置NFS共享的权限

Vagrant 流浪汉可以';无法设置NFS共享的权限,vagrant,puppet,puphpet,Vagrant,Puppet,Puphpet,我已经使用PuPHPet为我当前正在处理的项目的虚拟机创建了清单 直到最后(注意:完成的目录运行时间为xxx.xx秒)一切正常。然后它说: Stderr from the command: stdin: is not a tty Warning: Could not retrieve fact fqdn Error: Failed to set owner to '0': Operation not permitted - /var/www Error: /Stage[main]//File[

我已经使用PuPHPet为我当前正在处理的项目的虚拟机创建了清单

直到最后(注意:完成的目录运行时间为xxx.xx秒)一切正常。然后它说:

Stderr from the command:

stdin: is not a tty
Warning: Could not retrieve fact fqdn
Error: Failed to set owner to '0': Operation not permitted - /var/www
Error: /Stage[main]//File[/var/www]/owner: change from vagrant to root failed: Failed to set owner to '0': Operation not permitted - /var/www
Error: Failed to set group to '33': Operation not permitted - /var/www
Error: /Stage[main]//File[/var/www]/group: change from vagrant to www-data failed: Failed to set group to '33': Operation not permitted - /var/www
Warning: /Stage[main]//Apache::Vhost[ARbCsyrS6ueR]/File[/var/www/12_PHP_david_wright_images/src/web]: Skipping because of failed dependencies
Warning: /Stage[main]/Apache/Apache::Vhost[default]/File[15-default.conf]: Skipping because of failed dependencies
Warning: /Stage[main]//Apache::Vhost[ARbCsyrS6ueR]/File[25-ARbCsyrS6ueR.conf]: Skipping because of failed dependencies
Warning: /Stage[main]//Apache::Vhost[ARbCsyrS6ueR]/File[25-ARbCsyrS6ueR.conf symlink]: Skipping because of failed dependencies
Warning: /Stage[main]/Apache/Apache::Vhost[default]/File[15-default.conf symlink]: Skipping because of failed dependencies
Warning: /Stage[main]/Apache::Service/Service[httpd]: Skipping because of failed dependencies
我尝试过使用常规共享文件夹,但这带来了其他问题,而且据说共享文件夹的速度远不及NFS

我正在运行Ubuntu13.10作为主机操作系统,来宾是Ubuntu12.04。配置是相当标准的,如果有必要,我可以编辑它以包含PuPHPet创建的任何文件


如何解决此问题?

如果
/var/www
确实是NFS装载,则必须使用
norootsquash
选项导出它(如果您敢),否则Puppet(通常以root身份运行)将无法更改其权限


请注意,使用
rootsquash
和管理NFS权限服务器端更安全。

使用PuPHPet时,我也遇到了同样的问题。我的解决方案是将puphpet/vagrant/vagrant local中的第152行改成这样

        machine_id.bindfs.bind_folder "/mnt/vagrant-#{i}", "#{folder['target']}",
          after: :synced_folders,
因此,将“after”值更改为“synced_folders”对我来说是个好办法。
别忘了用“流浪者摧毁”和“流浪者上升”来完全重建你的流浪者机器。

你能同时显示你的流浪者文件吗?我选择了创建我自己的流浪者和傀儡设置,花了一点时间学习,但我认为这是值得的。至少现在它确实起作用了。我也不再有那个配置文件了,不过它只是一个直接从PuPHPet下载的文件,没有经过编辑。我自己使用PuPHPet,也有一些小问题需要通过手动编辑文件来纠正。PuPHPet目前正在积极开发中,所以我想这是预期的行为。但总的来说,这真的是一个很棒的工具。我同意,这是一个很棒的工具,但我很高兴我自己选择了学习如何使用Vagrant和Puppet,因为现在我可以创建一个更复杂的自动化环境,并知道如何将其全部更改为T。