-
Notifications
You must be signed in to change notification settings - Fork 44
Description
Description:
I am encountering an issue where the rmdir and unlink methods return a STATUS_ACCESS_DENIED (0xC0000022) error, even though the user has been verified to have Full Control Permissions.
Environment:
- Library Version: [0.2.11]
- Node Version: [16.17.1]
- Operating System: [Windows10]
Code:
Here is how I initialize the SMB2 client with anonymized sensitive information:
const smb2Client = new SMB2({
share: '[Your Share Path]',
domain: '[Your Domain]',
username: '[Anonymized Username]',
password: '[Anonymized Password]',
autoCloseTimeout: 0
});Steps to Reproduce:
- Initialize the SMB2 client with the appropriate credentials having Full Control Permissions.
- Attempt to execute
rmdirorunlinkmethods on the share.
Actual Results:
The library returns a STATUS_ACCESS_DENIED (0xC0000022) error, indicating a lack of permission to perform the operation.
Expected Results:
Given the user has Full Control Permissions, the rmdir and unlink operations should be executed successfully without any errors related to access denial.
Additional Information:
- The permissions for the user account have been verified, and it undeniably possesses Full Control Permissions over the share.
- The shared path and domain provided in the initialization are correct.
- Every other method including
exists,rename,readFile,writeFile,readdir, andmkdiroperates successfully, presenting issues only withrmdirandunlink. - Here are the relevant debug logs:
--request
smb2-forge.js:96 fe534d42400000000000000005007e0000000000000000001200000000000000c4a187006071d25ac719cb130000000000000000000000000000000000000000390000000200000000000000000000000000000000000000df011700000000000700000001000000200000007800160090000000000000006e006f00640065006a0073001b52fa5e8476ee76555f0042
smb2-forge.js:64 --response
smb2-forge.js:65 fe534d42400000000000000005007e0001000000000000001200000000000000c4a187006071d25ac719cb1300000000000000000000000000000000000000005900000001000000f42500da22f1d901d35456eb22f1d901f42500da22f1d901f42500da22f1d90100000000000000000000000000000000100000000000000009b124e5000000005eed9f57000000000000000000000000
smb2-forge.js:95 --request
smb2-forge.js:96 fe534d42400000000000000006007e0000000000000000001300000000000000c4a187006071d25ac719cb130000000000000000000000000000000000000000180000000000000009b124e5000000005eed9f5700000000
smb2-forge.js:64 --response
smb2-forge.js:65 fe534d42400000000000000006007e0001000000000000001300000000000000c4a187006071d25ac719cb1300000000000000000000000000000000000000003c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
smb2-forge.js:95 --request
smb2-forge.js:96 fe534d42400000000000000005007e0000000000000000001400000000000000c4a187006071d25ac719cb13000000000000000000000000000000000000000039000000020000000000000000000000000000000000000081001000000000000700000001000000210020007800160090000000000000006e006f00640065006a0073001b52fa5e8476ee76555f0042
smb2-forge.js:64 --response
smb2-forge.js:65 fe534d42400000000000000005007e0001000000000000001400000000000000c4a187006071d25ac719cb1300000000000000000000000000000000000000005900000001000000f42500da22f1d901d35456eb22f1d901f42500da22f1d901f42500da22f1d9010000000000000000000000000000000010000000000000009c28e1f6000000008caa8441000000000000000000000000
smb2-forge.js:95 --request
smb2-forge.js:96 fe534d42400000000000000011007e0000000000000000001500000000000000c4a187006071d25ac719cb1300000000000000000000000000000000000000002100010d0100000060000000000000009c28e1f6000000008caa84410000000001
smb2-forge.js:64 --response
smb2-forge.js:65 fe534d4240000000220000c011007e0001000000000000001500000000000000c4a187006071d25ac719cb130000000000000000000000000000000000000000090000000000000000
samba.js:136 Error during directory deletion process: 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.eval (message.js:25:21)
at Socket.eval (smb2-forge.js:72:31)
at Socket.emit (VM24 node:events:513:28)
at addChunk (VM66 readable:315:12)
at readableAddChunk (VM66 readable:289:9)
at Readable.push (VM66 readable:228:10)
at TCP.onStreamRead (VM51 stream_base_commons:190:23)
I am seeking guidance or advice on how to rectify this discrepancy. Is this indicative of a potential bug in the library, or is there an aspect I might be overlooking? Any assistance or insights provided would be highly valued.