我試圖使用共享文件夾的機制,但是該目錄是由vagrant
默認情況下,所有的效果很好安裝在遊民數據盤和tomcat6
無法寫入。所以,我想我可以使用設置磁盤的主人在vagrantfile:如何安裝給用戶的目錄中不存在尚未遊民
config.vm.synced_folder "data/", "/data", owner: "tomcat6", group: "tomcat6"
但tomcat的配方尚未運行tomcat6
用戶尚不存在卻又如此顛沛流離的失敗:
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:
mount -t vboxsf -o uid=`id -u tomcat6`,gid=`getent group tomcat6 | cut -d: -f3` data /data
mount -t vboxsf -o uid=`id -u tomcat6`,gid=`id -g tomcat6` data /data
The error output from the last command was:
stdin: is not a tty
id: tomcat6: no such user
id: tomcat6: no such user
uid= requires an argument (i.e. uid==<arg>)
我可以工作這一輪通過安裝與世界寫權限/數據,但似乎「錯誤的」,我(甚至在測試機上)。
那麼,有沒有辦法讓無業遊民爲我創建一個新用戶之前,我安裝盤或有廚師提供我一個共享磁盤以後呢?
您確實需要在主機上的/ etc/exports中設置no_root_squash以允許vagrant稍後更改所有者 –
不適用於Windows主機。 – Nate