Read / write files in node using fs in UNC path

Has problems reading/writing in a UNC path with nodeJs on my local machine. At some point, fs was read / written from my machine to the UNC path just fine, but now it seems that it cannot read / write to it.

UNC path: \\[machine name]\folder1\folder2\file.csv

I upgraded to node 12 back and thought there might be a network path error, but I don’t see anyone affecting it online. Then I used nvmw to download the old version of node and still nothing.

I wondered if this was because I was not joined to the same domain, however this was not a problem before. I can ping a box, access in Windows Explorer, remote login.

I tried running the application as my user as admin, added Windows credentials for the network administrator in Credential Manager.

I tried to change the flags used for r , r+ , a , a+ 0666 permissions ...

Missed Trails

  • \\[machine name]\
  • \\?\[machine name]\
  • \\?\UNC\[machine name]\

Write error

 { [Error: UNKNOWN, mkdir '\\[machine name]\Storage\CSV\Example.csv'] errno: -4094, code: 'UNKNOWN', path: '\\[machine name]\Storage\CSV\Example.csv' } 

Read error

 { [Error: UNKNOWN, open '\\[machine name]\Storage\CSV\Example.csv'] errno: -4094, code: 'UNKNOWN', path: '\\[machine name]\Storage\CSV\Example.csv' } 

I went through a lot of the actual fs code and it looks like I eventually generated the corresponding path, but it doesn't seem to be very well visible with windows to access the UNC path.

I hope that someone can give me some guidance on things to check or possible reasons for this.

+7
fs unc
source share

No one has answered this question yet.

See related questions:

1500
Writing Files to Node.js
300
Node.js check if the path is a file or directory
130
Access to a shared file (UNC) from a remote, untrusted domain with credentials
7
A UNC path pointing to a local directory is much slower than local access
5
Why doesn't my program recognize mapped UNC paths?
one
Vim slows UNC paths
0
C # writes the downloaded file to UNC with FileStream, sometimes it reads, sometimes it doesn't work
0
Nodejs: writing a file to a unix network location
0
Windows 8 StorageFile.GetFileFromPathAsync Using the UNC Path
-one
Access files from UNC network path in C # application

All Articles