Merge pull request #1926 from wazuh/bug/1920-set-right-permissions-for-malicious-ioc-list-files

Set right ownership for malicious-ioc files on container start
This commit is contained in:
Gonzalo Acuña
2025-07-04 15:36:35 -03:00
committed by GitHub
2 changed files with 8 additions and 6 deletions
+1
View File
@@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
### Added ### Added
- Set right ownership for malicious-ioc files on container start ([#1926](https://github.com/wazuh/wazuh-docker/pull/1926))
- Delete services statement in wazuh agent deployment. ([#1925](https://github.com/wazuh/wazuh-docker/pull/1925)) - Delete services statement in wazuh agent deployment. ([#1925](https://github.com/wazuh/wazuh-docker/pull/1925))
- Add permanent_data exceptions. ([#1890](https://github.com/wazuh/wazuh-docker/pull/1890)) - Add permanent_data exceptions. ([#1890](https://github.com/wazuh/wazuh-docker/pull/1890))
- Integrate bumper script via GitHub action. ([#1863](https://github.com/wazuh/wazuh-docker/pull/1863)) - Integrate bumper script via GitHub action. ([#1863](https://github.com/wazuh/wazuh-docker/pull/1863))
@@ -167,12 +167,13 @@ set_custom_cluster_key() {
} }
############################################################################## ##############################################################################
# Modify /var/ossec/queue/rids directory owner on # Set correct ownership for Wazuh related directories
# container start. # on container start.
############################################################################## ##############################################################################
set_rids_owner() { configure_permissions() {
chown -R wazuh:wazuh /var/ossec/queue/rids chown -R wazuh:wazuh /var/ossec/queue/rids
chown -R wazuh:wazuh /var/ossec/etc/lists
} }
############################################################################## ##############################################################################
@@ -226,8 +227,8 @@ main() {
# Delete temporary data folder # Delete temporary data folder
rm -rf ${WAZUH_INSTALL_PATH}/data_tmp rm -rf ${WAZUH_INSTALL_PATH}/data_tmp
# Set rids directory owner # Set correct ownership for Wazuh related directories
set_rids_owner configure_permissions
} }
main main