0

刀独奏准备失败。似乎没有创建 install.sh 的权限。

Warning: Failed to create the file install.sh: Permission denied
bash: install.sh: No such file or directory

你如何解决它?

$ knife solo prepare -VV <nodename>

DEBUG:           /bin/sh -c "             if command -v curl >/dev/null 2>&1; then               curl -L -o 'install.sh' 'https://www.opscode.com/chef/install.sh';             else               wget -O 'install.sh' 'https://www.opscode.com/chef/install.sh';             fi;           "
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0DEBUG:           /bin/sh -c "             if command -v curl >/dev/null 2>&1; then               curl -L -o 'install.sh' 'https://www.opscode.com/chef/install.sh';             else               wget -O 'install.sh' 'https://www.opscode.com/chef/install.sh';             fi;           "
 stdout: Warning: Failed to create the file install.sh: Permission denied

Warning: Failed to create the file install.sh: Permission denied
DEBUG:           /bin/sh -c "             if command -v curl >/dev/null 2>&1; then               curl -L -o 'install.sh' 'https://www.opscode.com/chef/install.sh';             else               wget -O 'install.sh' 'https://www.opscode.com/chef/install.sh';             fi;           "
 51 23110   51 11925    0     0  18535      0  0:00:01 --:--:--  0:00:01 18517

 51 23110   51 11925    0     0  18535      0  0:00:01 --:--:--  0:00:01 18517
DEBUG:           /bin/sh -c "             if command -v curl >/dev/null 2>&1; then               curl -L -o 'install.sh' 'https://www.opscode.com/chef/install.sh';             else               wget -O 'install.sh' 'https://www.opscode.com/chef/install.sh';             fi;           "
 stdout: curl: (23) Failed writing body (0 != 11925)

curl: (23) Failed writing body (0 != 11925)
DEBUG: Initial command sudo bash install.sh  -v 13.12.14
DEBUG: Running processed command sudo -p 'knife sudo password: ' bash install.sh  -v 13.12.14
DEBUG: sudo -p 'knife sudo password: ' bash install.sh  -v 13.12.14 stdout: bash: install.sh: No such file or directory

bash: install.sh: No such file or directory

厨师版本是 13.12.14。

4

1 回答 1

0

远程主机上主厨执行程序的 HOME 目录的所有者不正确。

它通过执行以下命令解决。

$ ssh <nodename> sudo chown <user> /home/<user>

于 2019-07-15T14:39:03.870 回答