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.
User contributions licensed under CC BY-SA 3.0