title: Nodejs : Writing file to a unix network location
body: <p>I was trying my hands at writing/reading a file to a network location using node.js.</p>
  
  <p>I used the file path as prescribed here :
  <a href="https://stackoverflow.com/questions/34837954/use-node-js-to-access-a-local-network-drive">Use node js to access a local network drive</a>.</p>
  
  <p>I tested my code on windows machine and network location was my workplace network where many systems were seen visible on the Network in My Computer.I was able to successfully read/write a file to any of these Network systems.</p>
  
  <p>After this I tried the same code with a UNIX machine , for which I was provided a username/password and a machine IP.</p>
  
  <p>However when I ran the same code with path changed I am getting an error saying:</p>
  
  <pre><code>  { [Error: UNKNOWN: unknown error, open '\\&lt;IP-Address&gt;\home\rstudio\work\ru
      ing\helloWorld.txt']
        errno: -4094,
        code: 'UNKNOWN',
        syscall: 'open',
        path: '\\\\&lt;IP-Address&gt;\\home\\rstudio\\work\\running\\helloWorld.txt' } 
  </code></pre>
  
  <p>Following is my code :</p>
  
  <pre><code>var fs = require("fs");
  
  fs.writeFile('\\\\&lt;IP-Address&gt;\\home\\rstudio\\work\\running\\helloWorld.txt', 'Hello World!', function (err) {
    if (err) return console.log(err);
    console.log('Hello World &gt; helloWorld.txt');
  });
  </code></pre>
  
  <p>For windows , I was putting the machine name instead of the IP-Address.</p>
  
  <p>Please let me know the reason for the error and also what should I do to successfully write file in the second case.</p>