Warn if config owner doesn't match process uid
This commit is contained in:
parent
b744ff6b1e
commit
d9abe9224e
@ -34,6 +34,16 @@ if (!fs.existsSync(path.join(
|
|||||||
|
|
||||||
Helper.setHome(process.env.THELOUNGE_HOME || Utils.defaultHome());
|
Helper.setHome(process.env.THELOUNGE_HOME || Utils.defaultHome());
|
||||||
|
|
||||||
|
// Check config file owner and warn if we're running under a different user
|
||||||
|
if (process.getuid) {
|
||||||
|
fs.stat(path.join(Helper.getHomePath(), "config.js"), (err, stat) => {
|
||||||
|
if (!err && stat.uid !== process.getuid()) {
|
||||||
|
log.warn("Config file owner does not match the user you are currently running The Lounge as.");
|
||||||
|
log.warn("To avoid issues, you should execute The Lounge commands under the same user.");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
Utils.checkOldHome();
|
Utils.checkOldHome();
|
||||||
|
|
||||||
// Merge config key-values passed as CLI options into the main config
|
// Merge config key-values passed as CLI options into the main config
|
||||||
|
Loading…
Reference in New Issue
Block a user