Node.JS: Alternative to chown string Node.JS: Alternative to chown string unix unix

Node.JS: Alternative to chown string


You've probably solved it by now, but for future reference: the uid-number package is used by npm, so I think it can be safely assumed that it works (and it does for me).


Just call chown directly:

var exec = require( "child_process" ).exec;exec( "chown user:group filename" );


I checked and found this: https://npmjs.org/package/getuidI haven't used it. caveat emptor.

Personally, I like looking these up in a configuration file that the user supplies :)

-daniel