Node-SMB / marsaud-smb2

SMB2 Client
53 stars 46 forks source link

fix(rename,unlink): fix STATUS_ACCESS_DENIED by passing shareAccess #21

Closed Niels-Be closed 3 years ago

Niels-Be commented 6 years ago

This is similar to the issues described in #18 and bchelli/node-smb2#17.

It sets correct ShareAccess values for rename and unlink requests. See https://msdn.microsoft.com/en-us/library/cc246502.aspx ShareAccess.

ShareAccess was always set to 0x00. For rename and delete requests it is required to include the 0x04 flag.

There might be other situations that require those flags, but I did not check since it was not covert by my use case.

I am not sure if this repo is still active, but I wanted to share my fix with the community anyways.

olivierlambert commented 6 years ago

@WaeCo thanks for this! This repo is active, just pinging @marsaud !

julien-f commented 5 years ago

Hello, can you rebase this PR against master please?

Thank you :slightly_smiling_face:

SHAPPY0 commented 3 years ago

Hi, Just wanted to check whether this fix is merged or not? because I'm facing the same issue while deleting a file. If not, then please suggest any workaround.

thanks!

julien-f commented 3 years ago

@SHAPPY0 No, as you can see, I never got a reply on this PR and therefore it was not merged.

SHAPPY0 commented 3 years ago

oh, any alternate?

julien-f commented 3 years ago

No, this package is no longer actively maintained, I will review, merge and release small PRs but nothing more.

Niels-Be commented 3 years ago

I rebased my fork, however I did not test it, since I am not using it anymore.

SHAPPY0 commented 3 years ago

@julien-f could you please merge this PR? Because I need it badly.

Thanks

julien-f commented 3 years ago

@WaeCo Thanks a lot!

SHAPPY0 commented 3 years ago

Thanks @WaeCo and @julien-f . So @julien-f when you are planning to publish this fix? I'm still getting tags v0.17.2

julien-f commented 3 years ago

@SHAPPY0 Published as 0.18.0 (because untested), please keep me posted :-)

SHAPPY0 commented 3 years ago

Tested 0.18.0, but no luck...getting same error of access denied,.... @julien-f @WaeCo