[
https://issues.apache.org/jira/browse/CAMEL-22611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18033286#comment-18033286
]
Valeriy Ak edited comment on CAMEL-22611 at 10/27/25 5:00 PM:
--------------------------------------------------------------
[~davsclaus] Done - [https://github.com/apache/camel/pull/19718] to main
branch. Do I need to create separate PRs for 4.10.x and 4.14.x branches?
was (Author: akvel):
[~davsclaus] Done - [https://github.com/apache/camel/pull/19718] to main
branch. Do I need to create another PRs for 4.10.x and 4.14.x (LTS) branches?
> SmbComponent: file move error if the user does not have "Full Control"
> permissions
> ----------------------------------------------------------------------------------
>
> Key: CAMEL-22611
> URL: https://issues.apache.org/jira/browse/CAMEL-22611
> Project: Camel
> Issue Type: Improvement
> Components: camel-smb
> Affects Versions: 4.10.0
> Reporter: Valeriy Ak
> Priority: Major
> Labels: SMBv2, windows
> Fix For: 4.10.8, 4.14.2, 4.16.0
>
>
> I’m using an SMB component to work with difrent shared folders.
> In one case the user doesn’t have full permissions - only the minimum
> required ones for reading, writing, and deleting files.
> When I configure *move* action, it calls
> [renameFile|https://github.com/apache/camel/blob/main/components/camel-smb/src/main/java/org/apache/camel/component/smb/SmbOperations.java#L194]
> method
> That method opens the file with a *{{GENERIC_ALL}}* access mask, but the user
> has only {{GENERIC_READ and DELETE}} permissions, which results in the
> following error:
> {code:java}
> com.hierynomus.mssmb2.SMBApiException - STATUS_ACCESS_DENIED (0xc0000022)
> {code}
>
> So I think it would be better to use the correct permissions on the source
> file:
> {code:java}
> ...
> try (File src
> = share.openFile(from, EnumSet.of(AccessMask.GENERIC_READ,
> AccessMask.DELETE), null,
> SMB2ShareAccess.ALL, SMB2CreateDisposition.FILE_OPEN, null)) {
> ...{code}
>
> In this case, everything should work correctly without requiring full rights.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)