RFE: allow fs.*chown* to accept user/group names in addition to uid/gid like process.setuid/setgid #4410

Closed
smfreegard opened this Issue Dec 12, 2012 · 4 comments

Comments

Projects
None yet
4 participants

fs.js:674
return binding.chown(pathModule._makeLong(path), uid, gid);
^
TypeError: uid must be an int
at Object.fs.chownSync (fs.js:674:18)

As there's no way to call uid/gid_to_name() in Javascript currently.

Owner

bnoordhuis commented Dec 13, 2012

I'll take patches. I added functions in 3ece130 for resolving user names and group names on POSIX platforms that you can repurpose.

Your challenge, if you choose to accept it, is to make it work on Windows as well.

I would if I could - sadly my C++ skills aren't capable of such a feat...

@bnoordhuis, Many programmers do not use Node.JS on Windows. If Windows is so much harder, please consider making this feature available for UNIX-like systems early.

Owner

jasnell commented Jun 22, 2015

Closing for lack of activity (but not lack of interest). If there's still interest in pursuing this, please open an issue in nodejs/io.js or nodejs/node.

jasnell closed this Jun 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment