Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chown not conform to glibc's chown #31673

Closed
MYDIH opened this issue Feb 7, 2020 · 1 comment
Closed

Chown not conform to glibc's chown #31673

MYDIH opened this issue Feb 7, 2020 · 1 comment
Labels
confirmed-bug Issues with confirmed bugs. fs Issues and PRs related to the fs subsystem / file system.

Comments

@MYDIH
Copy link

MYDIH commented Feb 7, 2020

  • Version: v12.4.0
  • Platform: Linux 5.5.2-arch1-1#1 SMP PREEMPT Tue, 04 Feb 2020 18:56:18 +0000 x86_64 GNU/Linux
  • Subsystem: fs

Hi,

When using fs.chown, I can't find a way to change only one of the two ids. It seems node isn't actually conforming to the glibc call linked in the documentation. When passing -1 (which according to chown should result in a noop for this id), I get an error :

The value of "uid" is out of range. It must be >= 0 && < 4294967296. Received -1

Is there a way to specify only one of the two ids ? If yes, can I kindly suggest that it should be added to the docs ?

Thanks

@MYDIH MYDIH changed the title Chown Chown not conform to glibc's chown Feb 7, 2020
@addaleax addaleax added confirmed-bug Issues with confirmed bugs. fs Issues and PRs related to the fs subsystem / file system. labels Feb 7, 2020
@addaleax
Copy link
Member

addaleax commented Feb 7, 2020

I think as a workaround you can use (-1 >>> 0) (a.k.a. 4294967295). This is a bug in the fs module’s typechecking, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs. fs Issues and PRs related to the fs subsystem / file system.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants