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

fs.stat should provide the stats although there is no permission #22577

Closed
NCC1701M opened this issue Aug 29, 2018 · 5 comments
Closed

fs.stat should provide the stats although there is no permission #22577

NCC1701M opened this issue Aug 29, 2018 · 5 comments
Labels
fs Issues and PRs related to the fs subsystem / file system. windows Issues and PRs related to the Windows platform.

Comments

@NCC1701M
Copy link

NCC1701M commented Aug 29, 2018

  • Version: v8.11.2
  • Platform: Win10 64-bit
  • Subsystem:

If you are calling fs.stat or fs.statSync on an item where you don't have permissions to read the error or respective the exception is of the EPERM / EBUSY type. But this shouldn't be occur on reading the stats of a file or folder it should occur when you try to read the content of the file/folder but not when reading the stats.

Because when you use the Explorer or an other file manager you are able to see the files/folders and their information - you can't enter or open - but you can see the information about it.

This should be supported by node.js as well.

@addaleax addaleax added fs Issues and PRs related to the fs subsystem / file system. windows Issues and PRs related to the Windows platform. labels Sep 2, 2018
@addaleax
Copy link
Member

addaleax commented Sep 2, 2018

@nodejs/platform-windows

@bzoz
Copy link
Contributor

bzoz commented Sep 3, 2018

stat and statSync open the file with FILE_READ_ATTRIBUTES (see libuv src/win/fs.c). Are you sure you can read attributes of those folders? I get this when I try to see props of another user on my machine:
image
image

@NCC1701M
Copy link
Author

NCC1701M commented Sep 4, 2018 via email

@bzoz
Copy link
Contributor

bzoz commented Sep 6, 2018

The pagefile.sys is a libuv issue: libuv/libuv#1980.

@Trott
Copy link
Member

Trott commented Nov 29, 2018

Closing due to inability to replicate, but please re-open if there's more information or someone manages to replicate this issue.

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

No branches or pull requests

4 participants