From d13e63ecaaba67f07f59fc8ae9006b1ac566af0f Mon Sep 17 00:00:00 2001 From: David Hill Date: Tue, 30 Oct 2018 09:18:39 -0500 Subject: [PATCH] MCOL-520 - chown sudo amazon --- oamapps/postConfigure/postConfigure.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/oamapps/postConfigure/postConfigure.cpp b/oamapps/postConfigure/postConfigure.cpp index 4cfc275a4..26cb8b5c4 100644 --- a/oamapps/postConfigure/postConfigure.cpp +++ b/oamapps/postConfigure/postConfigure.cpp @@ -4654,16 +4654,17 @@ bool createDbrootDirs(string DBRootStorageType) string cmd = "mount " + installDir + "/data1 > " + tmpDir + "/mount.txt 2>&1"; system(cmd.c_str()); - //if Amazon, Non-Root, and External EBS, use sudo - string SUDO = ""; - if ( amazonInstall && !rootUser && - ( DBRootStorageType == "external" ) ) - SUDO = "sudo "; - if ( !rootUser) { + //if Amazon, Non-Root, and External EBS, use sudo + string SUDO = ""; + if ( amazonInstall ) + SUDO = "sudo "; + cmd = SUDO + "chown -R " + USER + ":" + USER + " " + installDir + "/data1 > /dev/null"; +cout << cmd << endl; system(cmd.c_str()); +cout << cmd << endl; } // create system file directories