Skip to content

Commit

Permalink
Remove redundant ownership and permission commands for Wazuh plugins …
Browse files Browse the repository at this point in the history
…in deb and rpm build scripts

- Eliminated unnecessary `chown` and `chmod` commands for the Wazuh plugin directory in both the Debian and RPM packaging rules.
- This cleanup enhances the maintainability of the build scripts by reducing complexity and potential errors during installation.
  • Loading branch information
yenienserrano committed Dec 24, 2024
1 parent 0b37797 commit efe247a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions dev-tools/build-packages/deb/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ override_dh_install:
chown -R $(USER):$(GROUP) $(TARGET_DIR)$(INSTALLATION_DIR)
chown -R $(USER):$(GROUP) $(TARGET_DIR)$(CONFIG_DIR)

find $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/wazuh/ -exec chown $(USER):$(GROUP) {} \;

# -----------------------------------------------------------------------------

override_dh_fixperms:
Expand Down
6 changes: 0 additions & 6 deletions dev-tools/build-packages/rpm/wazuh-dashboard.spec
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,6 @@ find %{buildroot}%{CONFIG_DIR} -exec chown %{USER}:%{GROUP} {} \;

chown root:root %{buildroot}/etc/systemd/system/wazuh-dashboard.service

find %{buildroot}%{INSTALL_DIR}/plugins/wazuh/ -exec chown %{USER}:%{GROUP} {} \;
find %{buildroot}%{INSTALL_DIR}/plugins/wazuh/ -type f -perm 644 -exec chmod 640 {} \;
find %{buildroot}%{INSTALL_DIR}/plugins/wazuh/ -type f -perm 755 -exec chmod 750 {} \;
find %{buildroot}%{INSTALL_DIR}/plugins/wazuh/ -type d -exec chmod 750 {} \;
find %{buildroot}%{INSTALL_DIR}/plugins/wazuh/ -type f -perm 744 -exec chmod 740 {} \;

# -----------------------------------------------------------------------------

%pre
Expand Down

0 comments on commit efe247a

Please sign in to comment.