From 785b1efc70b9fefc75acde9d92a358aacf4caedf Mon Sep 17 00:00:00 2001 From: Rene Groeschke Date: Fri, 29 Sep 2023 15:16:15 +0200 Subject: [PATCH] Explicitly configure setgid for RPM and Dep packaging --- distribution/packages/build.gradle | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/distribution/packages/build.gradle b/distribution/packages/build.gradle index cecc5c7806240..1bd11dc2313ba 100644 --- a/distribution/packages/build.gradle +++ b/distribution/packages/build.gradle @@ -184,6 +184,7 @@ def commonPackageConfig(String type, String architecture) { configurationFile '/etc/elasticsearch/users_roles' from("${packagingFiles}") { dirMode 02750 + setgid = true into('/etc') permissionGroup 'elasticsearch' includeEmptyDirs true @@ -194,6 +195,7 @@ def commonPackageConfig(String type, String architecture) { from("${packagingFiles}/etc/elasticsearch") { into('/etc/elasticsearch') dirMode 02750 + setgid = true fileMode 0660 permissionGroup 'elasticsearch' includeEmptyDirs true @@ -240,7 +242,8 @@ def commonPackageConfig(String type, String architecture) { createDirectoryEntry true user u permissionGroup g - dirMode mode + dirMode = mode + setgid = mode == 02750 } } copyEmptyDir('/var/log/elasticsearch', 'elasticsearch', 'elasticsearch', 02750)