-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Node.js crash on Windows when no read permissions for the disk root. #3977
Comments
Can you not give "read attributes" permission to users? |
This is a requirement if you build a shared hosting on Windows with IIS and want to host Node.js apps. Most hosting control panels will remove C:\ (disk root) read permissions to prevent users from reading other's folders, like on this page: http://www.websitepanel.net/kb/how-to-prevent-users-to-access-other-users-folder |
In order to find the full path to In order to make node work, allow all users to "read file attributes" on the 3 paths I mentioned. This is not a security risk. |
Er, you'll probably want to select "apply to this file/folder only". |
It is not the problem that node cannot find an app.js script. In fact it can.. or it would if it wouldn't crash before on trying accessing optional c:\ I understand that node is searching for scripts and modules in many optional locations, but why would it crash if any of these optional locations is inaccessible because of permissions? I think it needs to gracefully move to the next possible location without crash. |
@govorunov @rukeba The problem is that node tries to resolve any symlinks in the path of the main module. |
@piscisaureus still a thing? |
WONTFIX for now. |
This is still a problem. There are situations where giving these permissions are not allowed in shared hosting. Composite C1 (CMS) is using this to compile .less where these permissions are not given. Here is the call stack.
|
Found a very simply solution...Use the 'Run as Administrator' to launch the Command Prompt. Am using cmder (http://bliker.github.io/cmder/ ) |
Node.js will crash with the error "Error: EPERM, operation not permitted 'C:'" if read permissions to the disk root are disabled. This situation happens often in a shared hosting environment since users only have permissions for certain folders and not the entire hard drive.
The text was updated successfully, but these errors were encountered: