The clone workspace plugin doesn't seem to preserve the permissions of the files in the cloned workspace.
      How to reproduce:

      • set up a job that stores the workspace
      • create a shell script with "execution" permission in the workspace
      • run the job
      • create a job that clones the workspace
      • run the job
      • examine the permissions of the script: the execution permission is gone

          [JENKINS-9577] Clone workspace does not preserve permissions

          Ciprian Ciubotariu added a comment - - edited

          Working with jenkins-1.432.war.

          Maybe a testcase would help. However, I am not equipped to add one to jenkins.

          Seems I'm going to stay with 1.432 for now.

          Ciprian Ciubotariu added a comment - - edited Working with jenkins-1.432.war. Maybe a testcase would help. However, I am not equipped to add one to jenkins. Seems I'm going to stay with 1.432 for now.

          Olaf Lenz added a comment - - edited

          Yes! I can confirm. I just updated to 1.432, and now it works. I assume that this was a bug in the ChangeLog, then. I think the bug can be closed. Thanks for the good work!

          Olaf Lenz added a comment - - edited Yes! I can confirm. I just updated to 1.432, and now it works. I assume that this was a bug in the ChangeLog, then. I think the bug can be closed. Thanks for the good work!

          Olaf Lenz added a comment -

          Bug is solved with 1.432. However, already 1.431 claimed to have it solved.

          Olaf Lenz added a comment - Bug is solved with 1.432. However, already 1.431 claimed to have it solved.

          Ciprian Ciubotariu added a comment - - edited

          Not sure if I need to reopen this bug, but since the change I introduced is responsible...

          My patch calls f.chmod() right after calling f.setLastModified(). This may change the last modified timestamp of the file to time of the chmod.

          I apologize for the inconveniences this may have caused.

          Ciprian Ciubotariu added a comment - - edited Not sure if I need to reopen this bug, but since the change I introduced is responsible... My patch calls f.chmod() right after calling f.setLastModified(). This may change the last modified timestamp of the file to time of the chmod. I apologize for the inconveniences this may have caused.

          Ciprian Ciubotariu added a comment - See https://github.com/jenkinsci/jenkins/pull/265

          Code changed in jenkins
          User: Seiji Sogabe
          Path:
          core/src/main/java/hudson/FilePath.java
          http://jenkins-ci.org/commit/jenkins/2bd40df44439ae04ecc2db306de70230f520c1a7
          Log:
          Merge pull request #265 from CMoH/jenkins-9577

          JENKINS-9577 Fix last modification timestamp after unzip

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Seiji Sogabe Path: core/src/main/java/hudson/FilePath.java http://jenkins-ci.org/commit/jenkins/2bd40df44439ae04ecc2db306de70230f520c1a7 Log: Merge pull request #265 from CMoH/jenkins-9577 JENKINS-9577 Fix last modification timestamp after unzip

          dogfood added a comment -

          Integrated in jenkins_main_trunk #1180
          JENKINS-9577 Fix last modification timestamp after unzip

          Ciprian Ciubotariu : f967feaca9836eb4295b588482d2fba27e59e8c1
          Files :

          • core/src/main/java/hudson/FilePath.java

          dogfood added a comment - Integrated in jenkins_main_trunk #1180 JENKINS-9577 Fix last modification timestamp after unzip Ciprian Ciubotariu : f967feaca9836eb4295b588482d2fba27e59e8c1 Files : core/src/main/java/hudson/FilePath.java

          Code changed in jenkins
          User: Ciprian Ciubotariu
          Path:
          changelog.html
          core/src/main/java/hudson/FilePath.java
          http://jenkins-ci.org/commit/jenkins/37a22a1cacc756fc9f1e6e6c3a0a7fa882e19944
          Log:
          [FIXED JENKINS-9577] Apply file permissions from zip archives

          Using the zip support classes just like Ant does in order to apply
          permissions. As a side-effect, remote streams need to be stored in a
          temporary file before actually unzipping them.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ciprian Ciubotariu Path: changelog.html core/src/main/java/hudson/FilePath.java http://jenkins-ci.org/commit/jenkins/37a22a1cacc756fc9f1e6e6c3a0a7fa882e19944 Log: [FIXED JENKINS-9577] Apply file permissions from zip archives Using the zip support classes just like Ant does in order to apply permissions. As a side-effect, remote streams need to be stored in a temporary file before actually unzipping them.

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          src/main/java/hudson/plugins/cloneworkspace/CloneWorkspacePublisher.java
          src/main/java/hudson/plugins/cloneworkspace/CloneWorkspaceSCM.java
          src/main/java/hudson/plugins/cloneworkspace/CloneWorkspaceUtil.java
          src/main/resources/hudson/plugins/cloneworkspace/CloneWorkspacePublisher/config.jelly
          src/main/webapp/archiveMethod.html
          src/main/webapp/workspaceExcludeGlob.html
          http://jenkins-ci.org/commit/jenkins-clone-workspace-scm-plugin/46807bc668132b4e916dd275f77fb20efc88553e
          Log:
          Merge pull request #1 from dkruger/master

          Proposed fixes for JENKINS-9582 and JENKINS-9577

          Compare: https://github.com/jenkinsci/jenkins-clone-workspace-scm-plugin/compare/8c64c38...46807bc

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: src/main/java/hudson/plugins/cloneworkspace/CloneWorkspacePublisher.java src/main/java/hudson/plugins/cloneworkspace/CloneWorkspaceSCM.java src/main/java/hudson/plugins/cloneworkspace/CloneWorkspaceUtil.java src/main/resources/hudson/plugins/cloneworkspace/CloneWorkspacePublisher/config.jelly src/main/webapp/archiveMethod.html src/main/webapp/workspaceExcludeGlob.html http://jenkins-ci.org/commit/jenkins-clone-workspace-scm-plugin/46807bc668132b4e916dd275f77fb20efc88553e Log: Merge pull request #1 from dkruger/master Proposed fixes for JENKINS-9582 and JENKINS-9577 Compare: https://github.com/jenkinsci/jenkins-clone-workspace-scm-plugin/compare/8c64c38...46807bc

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          src/main/java/hudson/plugins/cloneworkspace/CloneWorkspacePublisher.java
          src/main/resources/hudson/plugins/cloneworkspace/CloneWorkspacePublisher/config.jelly
          src/test/java/hudson/plugins/cloneworkspace/CloneWorkspaceSCMTest.java
          http://jenkins-ci.org/commit/jenkins-clone-workspace-scm-plugin/a92fbe254e800b81720f91f2dcde09ffcf92b5d4
          Log:
          Fixing test compilation due to changes for JENKINS-9582 and JENKINS-9577.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: src/main/java/hudson/plugins/cloneworkspace/CloneWorkspacePublisher.java src/main/resources/hudson/plugins/cloneworkspace/CloneWorkspacePublisher/config.jelly src/test/java/hudson/plugins/cloneworkspace/CloneWorkspaceSCMTest.java http://jenkins-ci.org/commit/jenkins-clone-workspace-scm-plugin/a92fbe254e800b81720f91f2dcde09ffcf92b5d4 Log: Fixing test compilation due to changes for JENKINS-9582 and JENKINS-9577 .

            olenz Olaf Lenz
            olenz Olaf Lenz
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: