Browse Source

chmod config files

pull/169/head
Emile Nijssen 3 years ago
parent
commit
0d908f56a0
  1. 8
      src/lib/WireGuard.js

8
src/lib/WireGuard.js

@ -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.');
}

Loading…
Cancel
Save