chmod config files

This commit is contained in:
Emile Nijssen 2022-01-10 22:47:45 -08:00
parent 3e473d0f81
commit 0d908f56a0

View File

@ -99,8 +99,12 @@ AllowedIPs = ${client.address}/32`;
}
debug('Saving config...');
await fs.writeFile(path.join(WG_PATH, 'wg0.json'), JSON.stringify(config, false, 2));
await fs.writeFile(path.join(WG_PATH, 'wg0.conf'), result);
await fs.writeFile(path.join(WG_PATH, 'wg0.json'), JSON.stringify(config, false, 2), {
mode: 0o660,
});
await fs.writeFile(path.join(WG_PATH, 'wg0.conf'), result, {
mode: 0o600,
});
debug('Config saved.');
}