• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • copyartifact-plugin
    • None
    • SLES 11.2, Jenkins 1.411

      When copying an executable file, the copied file is not executable, that is to say parts of the file permissions are lost.

          [JENKINS-9741] Copy artifact loses file permissions

          ikedam added a comment -

          Could you report more details of your problem?
          Especially, I want to know your OS and whether you use distributed build (master / slave).

          Copyartifact completely changed the copying mechanism in 1.21.
          Almost all comments in this page are already outdated, and I want to know problems with the latest version.

          I'll try to add automated tests for file permissions.

          ikedam added a comment - Could you report more details of your problem? Especially, I want to know your OS and whether you use distributed build (master / slave). Copyartifact completely changed the copying mechanism in 1.21. Almost all comments in this page are already outdated, and I want to know problems with the latest version. I'll try to add automated tests for file permissions.

          ikedam added a comment -

          ikedam added a comment - That known issue was added in 1.17, and may be outdated. https://wiki.jenkins-ci.org/pages/diffpagesbyversion.action?pageId=42470728&selectedPageVersions=33&selectedPageVersions=32

          Tom Sackett added a comment -

          I am running into the problem in a build running on a MacOS 10.8.5 slave, so this is a distributed build. The system is running Java 7, and it is using version 1.31 of the Copy Artifact plugin.

          Tom Sackett added a comment - I am running into the problem in a build running on a MacOS 10.8.5 slave, so this is a distributed build. The system is running Java 7, and it is using version 1.31 of the Copy Artifact plugin.

          ikedam added a comment -

          Before writing tests, I tested the behavior in my environment (Jenkins 1.590.1 + Copyartifact 1.30, Linux master / slave).
          It looks that the problem happens not when copying, but when archiving (that is, in upstream builds).

          @tsackett
          Can you see file permissions of archived artifacts?
          They should be in ${JENKINS_HOME}/jobs/(project name)/builds/(build number)/archive . They look lose permissions when archiving on master.

          ikedam added a comment - Before writing tests, I tested the behavior in my environment (Jenkins 1.590.1 + Copyartifact 1.30, Linux master / slave). It looks that the problem happens not when copying, but when archiving (that is, in upstream builds). @tsackett Can you see file permissions of archived artifacts? They should be in ${JENKINS_HOME}/jobs/(project name)/builds/(build number)/archive . They look lose permissions when archiving on master.

          ikedam added a comment -

          Fixed in 1.21.

          I added a test to verify file permission handling:
          https://github.com/jenkinsci/copyartifact-plugin/pull/45

          ikedam added a comment - Fixed in 1.21. I added a test to verify file permission handling: https://github.com/jenkinsci/copyartifact-plugin/pull/45

          ikedam added a comment -

          Removed "Known Issue" from Wiki page.

          ikedam added a comment - Removed "Known Issue" from Wiki page.

          Code changed in jenkins
          User: ikedam
          Path:
          src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
          http://jenkins-ci.org/commit/copyartifact-plugin/417cb13c63daf8f9c48d6710dd9157e3c9aeaf8a
          Log:
          JENKINS-9741 Added a test to verify file permission handling.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java http://jenkins-ci.org/commit/copyartifact-plugin/417cb13c63daf8f9c48d6710dd9157e3c9aeaf8a Log: JENKINS-9741 Added a test to verify file permission handling.

          Code changed in jenkins
          User: ikedam
          Path:
          src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
          http://jenkins-ci.org/commit/copyartifact-plugin/0424d2871e0a3b70afc1db5435e6d47e030f3e3f
          Log:
          JENKINS-9741 Fixed to pass file permissions with octals.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java http://jenkins-ci.org/commit/copyartifact-plugin/0424d2871e0a3b70afc1db5435e6d47e030f3e3f Log: JENKINS-9741 Fixed to pass file permissions with octals.

          Code changed in jenkins
          User: ikedam
          Path:
          src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
          http://jenkins-ci.org/commit/copyartifact-plugin/7e24b344197623a0c515ae160286fa26ff50900c
          Log:
          JENKINS-9741 Failed to set executable bits in a test.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java http://jenkins-ci.org/commit/copyartifact-plugin/7e24b344197623a0c515ae160286fa26ff50900c Log: JENKINS-9741 Failed to set executable bits in a test.

          Code changed in jenkins
          User: ikedam
          Path:
          src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
          http://jenkins-ci.org/commit/copyartifact-plugin/9f7f31b6bfec56e1df37f71b492cfdf60b70b38f
          Log:
          Merge pull request #45 from ikedam/feature/JENKINS-9741_TestsForFilePermissions

          JENKINS-9741 Added a test to verify file permission handling.

          Compare: https://github.com/jenkinsci/copyartifact-plugin/compare/e80d72c7cde3...9f7f31b6bfec

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java http://jenkins-ci.org/commit/copyartifact-plugin/9f7f31b6bfec56e1df37f71b492cfdf60b70b38f Log: Merge pull request #45 from ikedam/feature/ JENKINS-9741 _TestsForFilePermissions JENKINS-9741 Added a test to verify file permission handling. Compare: https://github.com/jenkinsci/copyartifact-plugin/compare/e80d72c7cde3...9f7f31b6bfec

            kohsuke Kohsuke Kawaguchi
            dreamtime Angela Johansson
            Votes:
            11 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: