Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

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

@smfreegard
Copy link

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.

@bnoordhuis
Copy link
Member

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.

@smfreegard
Copy link
Author

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

@GeorgeBailey
Copy link

@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.

@jasnell
Copy link
Member

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 jasnell closed this as completed Jun 22, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants