Skip to content

Commit b866ee5

Browse files
committed
Allow opensearch-dashboard user to read its config
In #3952, the permissions where changed to fix some inconsistencies in the .deb and .rpm packaging. This change restricted access to the configuration files (which where previously readable by all users) but failed to adjust the files ownership so that the service can access these files. Ensure the configuration directory and files belong to the root user and the opensearch-dashboards group Signed-off-by: Romain Tartière <[email protected]>
1 parent 76479cb commit b866ee5

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

scripts/pkg/build_templates/opensearch-dashboards/deb/debian/postinst

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ echo "### You can start opensearch-dashboards service by executing"
3737
echo " sudo systemctl start opensearch-dashboards.service"
3838

3939
# Set ownership and permissions
40+
chown -R root.opensearch-dashboards ${config_dir}
4041
chmod -R u=rwX,g=rX,o= ${config_dir}
4142

4243
chown -R opensearch-dashboards.adm ${log_dir}

scripts/pkg/build_templates/opensearch-dashboards/rpm/opensearch-dashboards.rpm.spec

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ exit 0
7676

7777
%post
7878
set -e
79+
chown -R root.%{name} %{config_dir}
7980
# Reload systemctl daemon
8081
if command -v systemctl > /dev/null; then
8182
systemctl daemon-reload

0 commit comments

Comments
 (0)