Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-46225

Error during push - invalid file permissions [v2.1]

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • cloudfoundry-plugin
    • None
    • Ubuntu 16.04.3
      Oracle JDK 1.8.0_144-b01
      Jenkins 2.6.2 (from Ubuntu PPA)

      Hi folks,

      after upgrading my cloudfoundry plugin to 2.x from 1.x I receive the following error whenever I try to push a new app (static build pack) to Bluemix:
      org.cloudfoundry.client.v2.ClientV2Exception: CF-AppResourcesFileModeInvalid(160003): The resource file mode is invalid: File mode '444' is invalid. Minimum file mode is '0600'
      However when I connect to the build server and run the the same push via cf cli, within the jenkins workspace directory, it works. So it really seems to be a problem with the plugin.

      Also, it does not help changing the files permissions after the build (e.g. chmod 755).

      The project configuration in jenkins used to work before.

      Best
      Patrick

       

          [JENKINS-46225] Error during push - invalid file permissions [v2.1]

          Olivier Lamy added a comment -

          Olivier Lamy added a comment - sworisbreathing ?

          Steven Swor added a comment -

          ppalacin - Does your Jenkins job use a manifest file, or do you specify the configuration in Jenkins? Also, does your workspace have a .cfignore file?

          Steven Swor added a comment - ppalacin - Does your Jenkins job use a manifest file, or do you specify the configuration in Jenkins? Also, does your workspace have a  .cfignore file?

          Hi sworisbreathing,

          i have a manifest that is used for development deployment. But the production app is pushed with a custom config provided in Jenkins.

          I have tried it with and without a cfignore, doesn't change anything

          Patrick Palacin added a comment - Hi sworisbreathing , i have a manifest that is used for development deployment. But the production app is pushed with a custom config provided in Jenkins. I have tried it with and without a cfignore, doesn't change anything

          Steven Swor added a comment - - edited

          ppalacin hrm... the plugin does have a test for a custom buildpack, which passes. I notice you don't specify an application path in your jenkins config (which means the plugin will attempt to push the entire workspace). Can you double-check the file permissions in the Jenkins workspace for the production push job (including any hidden files such as a .git/ folder)?

          Steven Swor added a comment - - edited ppalacin hrm... the plugin does have a test for a custom buildpack, which passes. I notice you don't specify an application path in your jenkins config (which means the plugin will attempt to push the entire workspace). Can you double-check the file permissions in the Jenkins workspace for the production push job (including any hidden files such as a .git/ folder)?

          Ali L added a comment -

          I am getting this when deploying to IBM Bluemix, not using a custom buildpack.

          org.cloudfoundry.client.v2.ClientV2Exception: CF-AppResourcesFileModeInvalid(160003): The resource file mode is invalid: File mode '444' is invalid. Minimum file mode is '0600'
          

          Helpfully it does not tell me what file has the invalid mode 

           

          Is this related to https://github.com/cloudfoundry/cf-java-client/issues/330 and https://github.com/cloudfoundry/cf-java-client/issues/810 ?

           

          Ali L added a comment - I am getting this when deploying to IBM Bluemix, not using a custom buildpack. org.cloudfoundry.client.v2.ClientV2Exception: CF-AppResourcesFileModeInvalid(160003): The resource file mode is invalid: File mode '444' is invalid. Minimum file mode is '0600' Helpfully it does not tell me what file has the invalid mode    Is this related to https://github.com/cloudfoundry/cf-java-client/issues/330  and https://github.com/cloudfoundry/cf-java-client/issues/810  ?  

          Steven Swor added a comment -

          ebiali - it could very well be related to https://github.com/cloudfoundry/cf-java-client/issues/810.

          According to https://github.com/cloudfoundry/cli/issues/1096#issuecomment-310532036 it seems to be an issue on the server side, so unfortunately getting the file name would require upgrading Bluemix to a version which has the change applied.

          My suspicion is it's trying to pick up a hidden file which has the permission applied (for example, something under .git/), but it's hard to know for certain without the filename.

          Steven Swor added a comment - ebiali - it could very well be related to https://github.com/cloudfoundry/cf-java-client/issues/810 . According to https://github.com/cloudfoundry/cli/issues/1096#issuecomment-310532036 it seems to be an issue on the server side, so unfortunately getting the file name would require upgrading Bluemix to a version which has the change applied. My suspicion is it's trying to pick up a hidden file which has the permission applied (for example, something under .git/ ), but it's hard to know for certain without the filename.

            sworisbreathing Steven Swor
            ppalacin Patrick Palacin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: