Fixed log.txt permission bits

This commit is contained in:
Noah Zalev 2021-04-19 12:57:27 -04:00
parent 05259eb7c7
commit 8a33e99aeb

View File

@ -2844,7 +2844,7 @@ function CreateMeshCentralServer(config, args) {
const d = new Date(); const d = new Date();
if (obj.xxLogFile == null) { if (obj.xxLogFile == null) {
try { try {
obj.xxLogFile = obj.fs.openSync(obj.getConfigFilePath('log.txt'), 'a+', 666); obj.xxLogFile = obj.fs.openSync(obj.getConfigFilePath('log.txt'), 'a+', 0o666);
obj.fs.writeSync(obj.xxLogFile, '---- Log start at ' + new Date().toLocaleString() + ' ----\r\n'); obj.fs.writeSync(obj.xxLogFile, '---- Log start at ' + new Date().toLocaleString() + ' ----\r\n');
obj.xxLogDateStr = d.toLocaleDateString(); obj.xxLogDateStr = d.toLocaleDateString();
} catch (ex) { } } catch (ex) { }