diff --git a/lib/API/LogManagement.js b/lib/API/LogManagement.js index 0b6409f9..79294db8 100644 --- a/lib/API/LogManagement.js +++ b/lib/API/LogManagement.js @@ -45,6 +45,8 @@ module.exports = function(CLI) { }; CLI.prototype.logrotate = function(opts, cb) { + var that = this; + if (process.getuid() != 0) { return exec('whoami', function(err, stdout, stderr) { Common.printError(cst.PREFIX_MSG + 'You have to run this command as root. Execute the following command:');