Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STATUS_ACCESS_DENIED #17

Closed
electriccode opened this issue Jun 14, 2016 · 11 comments
Closed

STATUS_ACCESS_DENIED #17

electriccode opened this issue Jun 14, 2016 · 11 comments

Comments

@electriccode
Copy link

Error: STATUS_ACCESS_DENIED (0xC0000022) : {Access Denied} A process has requested access to an object but has not been granted those access rights.
    at Object.03000000 (/Applications/MAMP/htdocs/pdfviewver/node_modules/smb2/lib/tools/message.js:25:18)
    at Socket.<anonymous> (/Applications/MAMP/htdocs/pdfviewver/node_modules/smb2/lib/tools/smb2-forge.js:72:31)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at readableAddChunk (_stream_readable.js:153:18)
    at Socket.Readable.push (_stream_readable.js:111:10)
    at TCP.onread (net.js:531:20)

Node version: v4.4.5
npm version: 2.15.5
OS: OSX 10.10.4 Yosemite

I am not able to understand the issue here. Is the process node don't have proper rights or something else is messed up? I am sure about username password and domain values. I have tried this command as a super user as well.

Here is my code

var SMB2 = require('smb2');
var smb2Client = new SMB2({
  share:'\\\\10.72.211.34\\Books\\'
, domain:'domainname'
, username:'username'
, password: process.env.PASS
// , debug: true
});
smb2Client.readdir('', function(err, files){
    if(err) throw err;
    console.log(files);
});

This is the additional output using debug true.

--request
fe534d42400000000000000000007e0000000000000000000000000000000000fdad5baa0000000000000000000000000000000000000000000000000000000024000200010000000000000000000000000000000000000000000000000000000000000002021002
--response
fe534d4240000000000000000000010001000000000000000000000000000000fdad5baa0000000000000000000000000000000000000000000000000000000041000300100200004d290ae5432f5b42982205cd9579146607000000000010000000100000001000f479d3b320c6d10123fa0d8374c5d10180007800204c4d20607606062b0601050502a06c306aa03c303a060a2b06010401823702021e06092a864882f71201020206092a864886f712010202060a2a864886f71201020203060a2b06010401823702020aa32a3028a0261b246e6f745f646566696e65645f696e5f5246433431373840706c656173655f69676e6f7265
--request
fe534d42400000000000000001007e0000000000000000000100000000000000fdad5baa000000000000000000000000000000000000000000000000000000001900000101000000000000005800350000000000000000004e544c4d535350000100000003b20000090009002c0000000c000c002000000031302e37312e3232382e333443484547472e434f4d
--response
fe534d4240000000160000c00100210001000000000000000100000000000000fdad5baa000000000d0000b80004000000000000000000000000000000000000090000004800d0004e544c4d53535000020000000a000a003800000005828102c466cd8093361cd000000000000000008e008e00420000000601b01d0000000f4300480045004700470002000a004300480045004700470001001400440045004c00480049002d00440043003000320004001200630068006500670067002e0063006f006d0003002800640065006c00680069002d0064006300300032002e00630068006500670067002e0063006f006d0005001200630068006500670067002e0063006f006d000700080055dbd5b320c6d10100000000
--request
fe534d42400000000000000001007e0000000000000000000200000000000000fdad5baa000000000d0000b800040000000000000000000000000000000000001900000101000000000000005800b80000000000000000004e544c4d5353500003000000180018008800000018001800a000000012001200400000001e001e0052000000180018007000000000000000b800000001820000430048004500470047002e0043004f004d00700068006100720074006900790061006c00700061006e006b0061006a00310030002e00370031002e003200320038002e003300340040185fd01157ea7ada0f7555c808341eef4f141d03f40c4beac983a6f0f70a0030bdb65399ce9d5d4feff37e5a1b4eee
--response
fe534d4240000000000000000100210009000000000000000200000000000000fdad5baa000000000d0000b8000400002ed7656fb8cbdfebb3dec750368605c50900000048000000
--request
fe534d42400000000000000003007e0000000000000000000300000000000000fdad5baa000000000d0000b800040000000000000000000000000000000000000900000048002a005c005c00310030002e00370031002e003200320038002e00330034005c0042006f006f006b0073005c00
--response
fe534d4240000000220000c00300210001000000000000000300000000000000fdad5baa000000000d0000b8000400000000000000000000000000000000000009000000000000005c
@hem1980
Copy link

hem1980 commented Sep 9, 2016

I am also getting the same error.

Node version: v6.1.0
npm version: 3.8.6
OS: Windows 10

@ClaytonSmith
Copy link

ClaytonSmith commented Nov 7, 2016

👍 Seeing the same thing here. Able to access the shares normally ( windows ) but STATUS_ACCESS_DENIED with SMB2 while using the same credentials ( on Mac )

@Indygather
Copy link

Hi all. Im having this problem...
Error: STATUS_ACCESS_DENIED (0xC0000022) : {Access Denied} A process has request
ed access to an object but has not been granted those access rights.
When trying to modify something in a directory (makdir, rename file, write file...). But i dont have this problem with reading operations (readdir, readFile, exists...)
It looks like im having problem with access rights, but when i configure the net unit with the same credentials im usting in node js with samba i can do everything...
Someone have any solution for this problem?
Thanks!

@deddu
Copy link

deddu commented Jun 20, 2017

same issue here too, but I can't even run the readdir.

@ClaytonSmith
Copy link

Is this project dead?

@izaakski
Copy link

I'm also getting this issue. Has anyone solved it? Is the project still being supported?

@nathanchan01
Copy link

You may check if the server-side SMB signing is enabled.
If yes, this module may not help client device or application server establish a session with file servers, and it would have this error as the result.
ref:
https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/microsoft-network-server-digitally-sign-communications-if-client-agrees

I cannot find any working nodejs smb modules for packet signing until this moment

@trevordowdle
Copy link

trevordowdle commented Jul 31, 2018

This issue seems to be fixed here: https://github.com/Node-SMB/marsaud-smb2
at least it worked with "readdir" for me.

For reference:
Node-SMB#18

The docs show

var SMB2 = require('smb2');

but I had to use

var SMB2 = require('@marsaud/smb2');

to reference the package.

@bchelli
Copy link
Owner

bchelli commented Oct 4, 2018

This is fixed in v0.2.11
Can you confirm?

Thanks

@bchelli bchelli closed this as completed Oct 7, 2018
@grath90
Copy link

grath90 commented Apr 18, 2019

I'm using version 0.2.11 and receiving the same error.

Trying to access a file share on windows server 2008 r2 from MacOS 10.14.3

After looking at Security Audit logs in the event viewer it shows a successful login but immediately after that it shows a log off event.

@mlucStefanini
Copy link

I confirm that it is not working for me either.
I can readdir, but when I do readFile it gives this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests