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

#3977 Node.js crash on Windows when no read permissions for the root #6434

Closed
wants to merge 1 commit into from

Conversation

napernik
Copy link

Fixing an error that was occurring if node was hosted on Azure or shared hosting, and the website user didn't have read NTFS persmissions on the root folder.

Examples:
#3977
http://stackoverflow.com/questions/12718488/error-eperm-operation-not-permitted-with-node-js-and-etherpad-lite

@Nodejs-Jenkins
Copy link

Thank you for contributing this pull request! Here are a few pointers to make sure your submission will be considered for inclusion.

Commit napernik/node@6288b7c has the following error(s):

  • First line of commit message must be no longer than 50 characters
  • Commit message must indicate the subsystem this commit changes

The following commiters were not found in the CLA:

  • Dmitry Dzygin

You can fix all these things without opening another issue.

Please see CONTRIBUTING.md for more information

@napernik
Copy link
Author

Changed the commit message

@bnoordhuis
Copy link
Member

This is a workaround for module loading issues when the user doesn't have enough privileges to stat below his home directory, right?

I don't think lib/fs.js is the right place to handle that. What's more, I'm not sure whether this is fixable without breaking module loading semantics.

/cc @isaacs and @sblom

@napernik
Copy link
Author

Yes, this will remove the requirement that the user need read permissions to all parent directories during module loading.

Some hosting providers will run a customer’s process under an account which do not have read access outside the website directory.

We're pretty eager to get this fixed since we're dependent on node and see our app being installed on systems where this permission restriction exist. If you can point us in a direction of a proper fix we'd like to go in that direction.

@Safety1st
Copy link

@Nodejs-Jenkins: when this fix will be integrated? I tried to use even the latest (dev?) version 0.11.14 of node.exe without success. I use 'Composite C1' CMS on shared hosting.

[Detailed site error]
Compiling less caused a scripting host error. fs.js:716
return binding.lstat(pathModule._makeLong(path));
^
Error: EPERM, operation not permitted 'E:'
at Error (native)
at Object.fs.lstatSync (fs.js:716:18)
at start (fs.js:1258:10)
at Object.realpathSync (fs.js:1246:3)
at tryFile (module.js:135:15)
at Function.Module._findPath (module.js:174:18)
at Function.Module._resolveFilename (module.js:334:25)
at Function.Module._load (module.js:278:25)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:124:16)

@trevnorris
Copy link

@bnoordhuis is correct. This shouldn't be done in lib/fs.js. I would entertain a patch that went into lib/module.js.

@jasnell
Copy link
Member

jasnell commented Aug 3, 2015

Closing due to lack of activity. Can revisit if someone is interested in updating the PR.

@jasnell jasnell closed this Aug 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants