Unable to connect to smb File Server

2

I am using node.js. The problem is, no matter which module I use, I always end with the following error.

Error: STATUS_ACCESS_DENIED (0xC0000022) : {Access Denied} A process has requested access to an object but has not been granted those access rights.

I have already used smb2 module and some of it's modifications such as @marsaud/smb2.

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.

The code I am trying to run is:

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);
});

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.

javascript
node.js
smb
asked on Stack Overflow Mar 8, 2019 by ngudbhav • edited Mar 8, 2019 by emix

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0