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

Access denied trying to move file #26

Open
leoatrwe opened this issue Apr 11, 2024 · 0 comments
Open

Access denied trying to move file #26

leoatrwe opened this issue Apr 11, 2024 · 0 comments

Comments

@leoatrwe
Copy link

[10:27:40 ERR] Errors: IP address removed: [EzSmb.Transports.Shares.Smb2Share.ExecMove] Create Handle Failed: path removed. NTStatus: STATUS_ACCESS_DENIED

Fixed by changing GENERIC_ALL to GENERIC_WRITE | DELETE in HandleType.ToArgs() (same as case HandleType.Delete), despite the comment in the code! I'm not sure if this fix is generic or specific to the setup at my company, and so I've not bothered with a PR.

case HandleType.Move:
// AccessMask.GENERIC_WRITE is failed in SMB2. Reqired GENERIC_ALL.
result.AccessMask
= AccessMask.GENERIC_WRITE
| AccessMask.DELETE
| AccessMask.SYNCHRONIZE;
result.ShareAccess = ShareAccess.Read;
result.CreateDisposition = CreateDisposition.FILE_OPEN;

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

1 participant