Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update . to : for all chown coomands in deb/rpm build templates #4641

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ echo " If you are configuring tools that require read access to the OpenSearch D
echo " For more information, see https://github.com/opensearch-project/opensearch-build/pull/4043"

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

chown -R opensearch-dashboards.adm ${log_dir}
chown -R opensearch-dashboards:adm ${log_dir}
chmod 750 ${log_dir}

chown -R opensearch-dashboards.opensearch-dashboards ${data_dir}
chown -R opensearch-dashboards:opensearch-dashboards ${data_dir}
chmod 750 ${data_dir}

chown -R opensearch-dashboards.opensearch-dashboards ${pid_dir}
chown -R opensearch-dashboards:opensearch-dashboards ${pid_dir}

exit 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ exit 0

%post
set -e
chown -R root.%{name} %{config_dir}
chown -R root:%{name} %{config_dir}
# Reload systemctl daemon
if command -v systemctl > /dev/null; then
systemctl daemon-reload
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ fi

# Set ownership and permissions
# FIXME: the opensearch service should not have w permission in the config directory
chown -R opensearch.opensearch ${config_dir}
chown -R opensearch:opensearch ${config_dir}
chmod -R u=rwX,g=rX,o= ${config_dir}

chown -R opensearch.adm ${log_dir}
chown -R opensearch:adm ${log_dir}
chmod 750 ${log_dir}

chown -R opensearch.opensearch ${data_dir}
chown -R opensearch:opensearch ${data_dir}
chmod 750 ${data_dir}

chown -R opensearch.opensearch ${pid_dir}
chown -R opensearch:opensearch ${pid_dir}

# Reload systemctl daemon
if command -v systemctl > /dev/null; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ set -e
if [ -d %{product_dir}/plugins/opensearch-security ]; then
sh %{product_dir}/plugins/opensearch-security/tools/install_demo_configuration.sh -y -i -s > %{log_dir}/install_demo_configuration.log 2>&1 || (echo "ERROR: Something went wrong during demo configuration installation. Please see the logs in %{log_dir}/install_demo_configuration.log" && exit 1)
fi
chown -R %{name}.%{name} %{config_dir}
chown -R %{name}.%{name} %{log_dir}
chown -R %{name}:%{name} %{config_dir}
chown -R %{name}:%{name} %{log_dir}
# Apply PerformanceAnalyzer Settings
chmod a+rw /tmp
if ! grep -q '## OpenSearch Performance Analyzer' %{config_dir}/jvm.options; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ echo " If you are configuring tools that require read access to the OpenSearch D
echo " For more information, see https://github.com/opensearch-project/opensearch-build/pull/4043"

# Set owner
chown -R opensearch-dashboards.opensearch-dashboards ${product_dir}
chown -R opensearch-dashboards.opensearch-dashboards ${config_dir}
chown -R opensearch-dashboards.opensearch-dashboards ${log_dir}
chown -R opensearch-dashboards.opensearch-dashboards ${data_dir}
chown -R opensearch-dashboards.opensearch-dashboards ${pid_dir}
chown -R opensearch-dashboards:opensearch-dashboards ${product_dir}
chown -R opensearch-dashboards:opensearch-dashboards ${config_dir}
chown -R opensearch-dashboards:opensearch-dashboards ${log_dir}
chown -R opensearch-dashboards:opensearch-dashboards ${data_dir}
chown -R opensearch-dashboards:opensearch-dashboards ${pid_dir}

exit 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ if ! grep -q '## OpenSearch Performance Analyzer' ${config_dir}/jvm.options; the
fi

# Set owner
chown -R opensearch.opensearch ${product_dir}
chown -R opensearch.opensearch ${config_dir}
chown -R opensearch.opensearch ${log_dir}
chown -R opensearch.opensearch ${data_dir}
chown -R opensearch.opensearch ${pid_dir}
chown -R opensearch:opensearch ${product_dir}
chown -R opensearch:opensearch ${config_dir}
chown -R opensearch:opensearch ${log_dir}
chown -R opensearch:opensearch ${data_dir}
chown -R opensearch:opensearch ${pid_dir}

# Reload systemctl daemon
if command -v systemctl > /dev/null; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ set -e
if [ -d %{product_dir}/plugins/opensearch-security ]; then
sh %{product_dir}/plugins/opensearch-security/tools/install_demo_configuration.sh -y -i -s > %{log_dir}/install_demo_configuration.log 2>&1
fi
chown -R %{name}.%{name} %{config_dir}
chown -R %{name}.%{name} %{log_dir}
chown -R %{name}:%{name} %{config_dir}
chown -R %{name}:%{name} %{log_dir}
# Apply PerformanceAnalyzer Settings
chmod a+rw /tmp
if ! grep -q '## OpenSearch Performance Analyzer' %{config_dir}/jvm.options; then
Expand Down
Loading