From b70c0a98feb193f54361673d050b34522c35640a Mon Sep 17 00:00:00 2001 From: Maxime Poulin Date: Sat, 27 Feb 2016 21:04:09 -0500 Subject: [PATCH] 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. --- src/clientManager.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/clientManager.js b/src/clientManager.js index 2b0fbb87..8c7c73e6 100644 --- a/src/clientManager.js +++ b/src/clientManager.js @@ -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);