diff --git a/distribution/deb/pom.xml b/distribution/deb/pom.xml
index 182398d91eb..c43e32be4f7 100644
--- a/distribution/deb/pom.xml
+++ b/distribution/deb/pom.xml
@@ -120,6 +120,19 @@
root
+
+
+ template
+
+ ${packaging.elasticsearch.conf.dir}
+
+
+ perm
+ 750
+ root
+ elasticsearch
+
+
${project.basedir}/../src/main/resources/config
@@ -128,8 +141,9 @@
perm
${packaging.elasticsearch.conf.dir}
+ 750
root
- root
+ elasticsearch
@@ -137,6 +151,12 @@
${packaging.elasticsearch.conf.dir}/scripts
+
+ perm
+ 750
+ root
+ elasticsearch
+
diff --git a/distribution/rpm/pom.xml b/distribution/rpm/pom.xml
index 1e3004cab3d..218e19e57b7 100644
--- a/distribution/rpm/pom.xml
+++ b/distribution/rpm/pom.xml
@@ -142,10 +142,14 @@
that creates the conf.dir.-->
${packaging.elasticsearch.conf.dir}
noreplace
+ elasticsearch
+ 750
${packaging.elasticsearch.conf.dir}/
noreplace
+ elasticsearch
+ 750