1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-520 - chown sudo amazon

This commit is contained in:
David Hill
2018-10-30 08:55:42 -05:00
parent cc158c9c96
commit d4005120a6

View File

@ -4654,9 +4654,15 @@ 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)
{
cmd = "chown -R " + USER + ":" + USER + " " + installDir + "/data1 > /dev/null";
cmd = SUDO + "chown -R " + USER + ":" + USER + " " + installDir + "/data1 > /dev/null";
system(cmd.c_str());
}