2013-11-26 22 views
2

我使用PuPHPet爲我目前正在處理的項目的虛擬機創建清單。Vagrant無法設置NFS共享的權限

一切都很好,直到最後(在「注意:完成目錄在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。

我將Ubuntu 13.10作爲主機操作系統運行,來賓是Ubuntu 12.04。如果有必要,配置是相當標準的,我可以編輯它來包含PuPHPet創建的任何文件。

可以做些什麼來解決這個問題?

+0

你能不能請你出示你的流浪文件。 –

+0

我已經選擇創建自己的Vagrant和Puppet設置,需要一點學習,但我認爲它已經得到了回報。它現在至少可以工作。我也沒有這個配置文件,但它只是一個從PuPHPet直接沒有被編輯。 – Seer

+0

我自己使用PuPHPet,並且還有一些小問題需要通過手動編輯文件來糾正。 PuPHPet目前正處於積極的發展階段,因此我認爲這是預期的行爲。但總的來說,這是一個非常棒的工具 –

回答

1

如果/var/www確實是一個NFS掛載,它必須與norootsquash選項(如果你敢)出口,否則木偶(通常以root身份運行),將無法更改其權限。

請注意,使用rootsquash並管理NFS權限服務器端更爲安全。

0

使用PuPHPet我有同樣的問題。解決的辦法是爲我改變線路152 puphpet /流浪者/流浪本地,它看起來像這樣

 machine_id.bindfs.bind_folder "/mnt/vagrant-#{i}", "#{folder['target']}", 
      after: :synced_folders, 

因此改變「之後的」值「synced_folders」奏效了我。 不要忘記完全用「流浪摧毀」和「流浪乞丐」重建你的流浪者機器

相關問題