Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-19615

camel-ftp: chmodDirectory option try for each junk to change the directory permission and fails

    XMLWordPrintableJSON

Details

    • Unknown

    Description

      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 it will try for each (already existing junk) to change the directory permission and fails.
       
      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
       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rambichler Michael Rambichler
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: