diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/ApplicationPluginAction.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/ApplicationPluginAction.java index fb4345321b..8894a95ab4 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/ApplicationPluginAction.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/ApplicationPluginAction.java @@ -66,10 +66,11 @@ final class ApplicationPluginAction implements PluginApplicationAction { .fromString(loadResource("/windowsStartScript.txt"))); project.getConfigurations().all((configuration) -> { if ("bootArchives".equals(configuration.getName())) { - distribution.getContents() - .with(project.copySpec().into("lib") - .from((Callable) () -> configuration - .getArtifacts().getFiles())); + CopySpec libCopySpec = project.copySpec().into("lib") + .from((Callable) () -> configuration + .getArtifacts().getFiles()); + libCopySpec.setFileMode(0644); + distribution.getContents().with(libCopySpec); bootStartScripts.setClasspath(configuration.getArtifacts().getFiles()); } });