title: Unable to connect to smb File Server
body: <p>I am using node.js. The problem is, no matter which module I use, I always end with the following error.</p>
  
  <blockquote>
    <p>Error: STATUS_ACCESS_DENIED (0xC0000022) : {Access Denied} A process has requested access to an object but has not been granted those access rights.</p>
  </blockquote>
  
  <p>I have already used smb2 module and some of it's modifications such as <code>@marsaud/smb2</code>.</p>
  
  <p>The Server I am trying to connect is a fileserver on the network drive of the college. The fileserver requires a combination of username and password.</p>
  
  <p>The code I am trying to run is:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var SMB2 = require('smb2');
  var smb2Client = new SMB2({
   share:'\\\\fileserver2\\Study%20Material\\',
   domain:'JIIT',
   username:'username',
   password:'password'
  });
  smb2Client.readdir('/', function(err, files){
   if(err) throw err;
   console.log(files);
  });</code></pre>
  </div>
  </div>
  </p>
  
  <p>I don't know whether it is useful or not, but I have tried to run this code both on Windows and linux.
  Any help is appreciated.</p>