[
https://issues.apache.org/jira/browse/CAMEL-19615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-19615.
---------------------------------
Resolution: Fixed
Thanks for the PR
> camel-ftp: chmodDirectory option try for each junk to change the directory
> permission and fails
> -----------------------------------------------------------------------------------------------
>
> Key: CAMEL-19615
> URL: https://issues.apache.org/jira/browse/CAMEL-19615
> Project: Camel
> Issue Type: Improvement
> Components: camel-sftp
> Affects Versions: 3.18.2
> Reporter: Michael Rambichler
> Priority: Major
> Fix For: 3.14.10, 3.20.7, 3.21.1, 3.22.0, 4.0-RC2, 4.0.0
>
>
> We have a blocking issue with the current chmodDirectory option.
> [https://camel.apache.org/components/3.20.x/sftp-component.html#_endpoint_query_option_chmodDirectory]
>
> *Steps to reproduce:*
> SFTP Directory: ../home/user/restricted/dir/subdir (where restricted e.g.
> does not have change rights for the current user)
> Component Call:
> "sftp://localhost:21/home/user/restricted/dir/subdir/newDir" +
> "?username=admin&password=admin&chmod=777&chmodDirectory=770"
>
> *Behaviour:*
> The current implementation steps down the directory and try to create each
> junk. If the chmodDirectory option is set then i{color:#FF0000}t will try for
> each (already existing junk) to change the directory permission and
> fails.{color}
>
> *Expected Behaviour:*
> It should only try to change the permission if the directory does not yet
> exists
>
> I have already created a fix and added a Testcase for better debugging (but
> the Testcase does not reproduce the error because it would remove the
> permission for the current user and afterwards your need root rights to
> delete the Testdirectory again. Not suitable pipeline builds)
> [https://github.com/michael-salzburg/camel]
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)