Remove attempts to set file modes

After some testing and manually trying to set sane file modes, it turns out the umask still applies. So it seems the logical way to handle this is to actually rely on the OS umask to set proper permissions.
This commit is contained in:
Maxime Poulin 2016-02-27 21:04:09 -05:00
parent 1d8667ed4b
commit b70c0a98fe

View file

@ -80,8 +80,7 @@ ClientManager.prototype.addUser = function(name, password) {
mkdirp.sync(path);
fs.writeFileSync(
path + "/" + name + ".json",
JSON.stringify(user, null, " "),
{mode: "0777"}
JSON.stringify(user, null, " ")
);
} catch (e) {
throw e;
@ -111,7 +110,6 @@ ClientManager.prototype.updateUser = function(name, opts) {
fs.writeFileSync(
path,
JSON.stringify(user, null, " "),
{mode: "0777"},
function(err) {
if (err) {
console.log(err);