Skip to content
This repository has been archived by the owner on Sep 2, 2018. It is now read-only.

Commit

Permalink
Fix file uploading
Browse files Browse the repository at this point in the history
  • Loading branch information
LordRalex committed Mar 9, 2016
1 parent 4277125 commit a2238cf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/interfaces/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ var BServer = BinaryServer({
var IO = require('socket.io').listen(RestServer);
var Servers = Rfr('lib/initalize.js').servers;
var Path = require('path');
var Util = require('util');
var Userid = require('userid');

Scales.prototype.socketio = function () {

Expand Down Expand Up @@ -144,7 +146,8 @@ Scales.prototype.binaryjs = function () {
});

stream.on('end', function () {
Fs.chown(file.path, server.config.user, server.config.user);
Logger.verbose(Util.format('Updating file perms for %s (changing to %s:%s)', file.path, server.config.user, server.config.user));
Fs.chownSync(file.path, Userid.uid(server.config.user), Userid.gid(server.config.user));
});
});
});
Expand Down

0 comments on commit a2238cf

Please sign in to comment.