From 35df7a56174f3e4970fae5b8127b83f1d87bbab6 Mon Sep 17 00:00:00 2001 From: Alexander Lutay Date: Wed, 18 Nov 2015 17:55:44 +0100 Subject: [PATCH] MT#16489 Fix typo and default permissions for .ssh/sipwise_vagrant_key Change-Id: Ifab771d0f6b511f7fc6fbc249651871ea410d81f --- deployment.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deployment.sh b/deployment.sh index 600c8d2..997b461 100755 --- a/deployment.sh +++ b/deployment.sh @@ -2029,11 +2029,13 @@ vagrant_configuration() { mkdir -p "${TARGET}/${SIPWISE_HOME}/.ssh/" cat "${ngcp_vmbuilder}/config/id_rsa_sipwise.pub" >> "${TARGET}/${SIPWISE_HOME}/.ssh/sipwise_vagrant_key" chroot "${TARGET}" chown sipwise:sipwise "${SIPWISE_HOME}/.ssh" "${SIPWISE_HOME}/.ssh/sipwise_vagrant_key" + chroot "${TARGET}" chmod 0600 "${SIPWISE_HOME}/.ssh/sipwise_vagrant_key" fi echo "Adjusting ssh configuration for user root" mkdir -p "${TARGET}/root/.ssh/" - cat "${mngcp_vmbuilder}/config/id_rsa_sipwise.pub" >> "${TARGET}/root/.ssh/sipwise_vagrant_key" + cat "${ngcp_vmbuilder}/config/id_rsa_sipwise.pub" >> "${TARGET}/root/.ssh/sipwise_vagrant_key" + chroot "${TARGET}" chmod 0600 /root/.ssh/sipwise_vagrant_key # see https://github.com/mitchellh/vagrant/issues/1673 # and https://bugs.launchpad.net/ubuntu/+source/xen-3.1/+bug/1167281