set correct owner for SW update procedure
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2022-09-26 18:40:31 +02:00
parent cbb1fdfd5e
commit 9d440838e9
3 changed files with 37 additions and 1 deletions

View File

@ -1936,6 +1936,22 @@ ReturnValue_t CoreController::executeSwUpdate(SwUpdateSources sourceDir, const u
utility::handleSystemError(result, "CoreController::executeAction: Copying SW version file");
}
cmd.clear();
// Set correct permission for both files
cmd << "chmod 0755 " << obswDestPath;
result = system(cmd.str().c_str());
if (result != 0) {
utility::handleSystemError(result, "CoreController::executeAction: Copying SW permissions 0755");
}
cmd.clear();
cmd << "chmod 0644 " << obswVersionDestPath;
result = system(cmd.str().c_str());
if (result != 0) {
utility::handleSystemError(result, "CoreController::executeAction: Setting version file permission 0644");
}
cmd.clear();
// TODO: This takes a long time and will block the core controller.. Maybe use command executor?
// For now dont care..
cmd << "writeprotect " << data[0] << " " << data[1] << " 1";