2016-06-23 27 views
0

可能我的問題是相當微不足道的,但我找不到任何關於它的任何內容。 我需要的是有一個目錄始終創建在我的流浪者與特定的所有者和模式。這可能以某種方式輕鬆嗎?Puphpet創建目錄

回答

1

如果你想與您的主機系統同步的文件夾,然後在Vagrant.configure(2) do |config|部分中這一行添加到您的Vagrantfile:

config.vm.synced_folder "host_dir", "guest_dir", create: true , group: "name_of_group", owner: "name_of_owner" 

如果你只是想創建您可以使用內嵌在客戶系統上的文件夾shell提供:

config.vm.provision "shell", inline: "mkdir -p guest_dir && chown -R owner:group guest_dir" 

^假設你正在運行一個linux虛擬機。

+0

謝謝!這就像一個魅力 – emul