Skip to content

Commit

Permalink
[FIXED JENKINS-30941] Do not remove execute and write bit from direct…
Browse files Browse the repository at this point in the history
…ories that need to be cleaned up
  • Loading branch information
jtnord committed Oct 15, 2015
1 parent 177dbd1 commit 3cd54c0
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -58,7 +58,14 @@ public class FileBinding extends Binding<FileCredentials> {
secrets.chmod(/*0700*/448);
FilePath secret = dir.child(credentials.getFileName());
copy(secret, credentials);
secret.chmod(0400);
if (secret.isDirectory()) { /* ZipFileBinding */
// needs to be writable so we can delete its contents
// needs to be executable so we can list the contents
secret.chmod(0700);
}
else {
secret.chmod(0400);
}
return new SingleEnvironment(secret.getRemote(), new UnbinderImpl(dirName));
}

Expand Down

0 comments on commit 3cd54c0

Please sign in to comment.