diff --git a/oam/oamcpp/liboamcpp.cpp b/oam/oamcpp/liboamcpp.cpp index aca414bf9..9b7ee2fab 100644 --- a/oam/oamcpp/liboamcpp.cpp +++ b/oam/oamcpp/liboamcpp.cpp @@ -9473,7 +9473,7 @@ std::string Oam::getMySQLPassword() /****************************************************************************************** * @brief updateFstab * -* purpose: check and get mysql user password +* purpose: Update Fstabs for Amazon EBS setup * ******************************************************************************************/ std::string Oam::updateFstab(std::string device, std::string dbrootID) @@ -9499,7 +9499,8 @@ std::string Oam::updateFstab(std::string device, std::string dbrootID) if (WEXITSTATUS(status) != 0 ) { - //update /etc/fstab with mount + //chmod before update, used on amazon ami EBS. not other systems + system("sudo chmod 666 /etc/fstab"); //update local fstab cmd = "echo " + entry + " >> /etc/fstab"; diff --git a/procmon/processmonitor.cpp b/procmon/processmonitor.cpp index 2f61ae690..482b5c2bb 100644 --- a/procmon/processmonitor.cpp +++ b/procmon/processmonitor.cpp @@ -1867,6 +1867,9 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO if (WEXITSTATUS(status) != 0 ) { + //chmod before update, used on amazon ami EBS. not other systems + system("sudo chmod 666 /etc/fstab"); + cmd = "echo " + entry + " >> /etc/fstab"; system(cmd.c_str());