From b2193d25b720272cde7e5f939f4b23597a16ce90 Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 27 Oct 2010 10:38:13 +0000 Subject: [PATCH] make sure when creating the ca _xcat hostkeys _ssh subdirectories in /install/postscripts they are 755 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7939 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xCAT-server/sbin/xcatconfig b/xCAT-server/sbin/xcatconfig index a6db4946f..de012678b 100755 --- a/xCAT-server/sbin/xcatconfig +++ b/xCAT-server/sbin/xcatconfig @@ -514,7 +514,7 @@ sub genSSHRootKeys # if (!-d "$::INSTALLDIR/postscripts/_ssh") { - my $cmd = "/bin/mkdir -p $::INSTALLDIR/postscripts/_ssh"; + my $cmd = "/bin/mkdir -m 755 -p $::INSTALLDIR/postscripts/_ssh"; my $outref = xCAT::Utils->runcmd("$cmd", 0); if ($::RUNCMD_RC != 0) { @@ -626,7 +626,7 @@ sub genSSHNodeHostKey # create directories /etc/xcat/hostkeys and /install/postscripts/hostkeys if (!-d "$::INSTALLDIR/postscripts/hostkeys") # directory for public keys { - my $cmd = "/bin/mkdir -p $::INSTALLDIR/postscripts/hostkeys"; + my $cmd = "/bin/mkdir -m 755 -p $::INSTALLDIR/postscripts/hostkeys"; my $outref = xCAT::Utils->runcmd("$cmd", 0); if ($::RUNCMD_RC != 0) { @@ -1263,7 +1263,7 @@ sub genCredentials # copy to postscript directory just non-sensitive files my $cmd = "/bin/rm -rf $::INSTALLDIR/postscripts/ca >/dev/null 2>&1"; my $outref = xCAT::Utils->runcmd("$cmd", 0); - $cmd = "/bin/mkdir -p $::INSTALLDIR/postscripts/ca"; + $cmd = "/bin/mkdir -m 755 -p $::INSTALLDIR/postscripts/ca"; $outref = xCAT::Utils->runcmd("$cmd", 0); if ($::RUNCMD_RC != 0) { @@ -1339,7 +1339,7 @@ sub genCredentials # copy to postscript directory $cmd = "/bin/rm -rf $::INSTALLDIR/postscripts/_xcat >/dev/null 2>&1"; $outref = xCAT::Utils->runcmd("$cmd", 0); - $cmd = "/bin/mkdir -p $::INSTALLDIR/postscripts/_xcat"; + $cmd = "/bin/mkdir -m 755 -p $::INSTALLDIR/postscripts/_xcat"; $outref = xCAT::Utils->runcmd("$cmd", 0); if ($::RUNCMD_RC != 0) {