Skip to content

Commit

Permalink
Revert "Fix files ownership and permissions in OpenSearch-Dashboards …
Browse files Browse the repository at this point in the history
…packages (opensearch-project#3952)"

This reverts commit b5f7ae2.
  • Loading branch information
peterzhuamazon committed Sep 19, 2023
1 parent a0bfacb commit bbf2d3e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,11 @@ echo " sudo systemctl enable opensearch-dashboards.service"
echo "### You can start opensearch-dashboards service by executing"
echo " sudo systemctl start opensearch-dashboards.service"

# Set ownership and permissions
chmod -R u=rwX,g=rX,o= ${config_dir}

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

# 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}
chmod 750 ${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 @@ -42,7 +42,6 @@ ln -s ${data_dir} ${buildroot}${product_dir}/data
ln -s ${log_dir} ${buildroot}${product_dir}/logs

# Change Permissions
chmod -Rf g-s ${buildroot}/*
chmod -Rf u=rwX,g=rX,o=rX ${buildroot}/*
chmod -Rf a+rX,u+w,g-w,o-w ${buildroot}/*

exit 0
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ chmod 0755 %{buildroot}%{product_dir}/bin/*
ln -s %{data_dir} %{buildroot}%{product_dir}/data
ln -s %{log_dir} %{buildroot}%{product_dir}/logs
# Change Permissions
chmod -Rf g-s %{buildroot}/*
chmod -Rf u=rwX,g=rX,o= %{buildroot}/etc
chmod -Rf a+rX,u+w,g-w,o-w %{buildroot}/*
exit 0

%pre
Expand Down Expand Up @@ -102,7 +101,7 @@ exit 0

%files
# Permissions
%defattr(-, root, root)
%defattr(-, %{name}, %{name})

# Root dirs/docs/licenses
%dir %{product_dir}
Expand Down Expand Up @@ -131,9 +130,9 @@ exit 0
%{product_dir}/node_modules
%{product_dir}/plugins
%{product_dir}/src
%attr(750, %{name}, %{name}) %{log_dir}
%attr(750, %{name}, %{name}) %{pid_dir}
%dir %attr(750, %{name}, %{name}) %{data_dir}
%{log_dir}
%{pid_dir}
%dir %{data_dir}

# Symlinks
%{product_dir}/data
Expand Down

0 comments on commit bbf2d3e

Please sign in to comment.