mirror of
https://github.com/wazuh/wazuh-docker.git
synced 2025-10-23 06:11:57 +00:00
Merge pull request #706 from wazuh/MigrationTo43-WazuhManagerNew
Fix permissions/ownership issue for Wazuh manager migration (4.2 -> 4.3)
This commit is contained in:
@@ -179,6 +179,15 @@ set_rids_owner() {
|
||||
chown -R wazuh:wazuh /var/ossec/queue/rids
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# Change any ossec user/group to wazuh user/group
|
||||
##############################################################################
|
||||
|
||||
set_correct_permOwner() {
|
||||
find / -group 997 -exec chown :101 {} +;
|
||||
find / -user 999 -exec chown 101 {} +;
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# Main function
|
||||
##############################################################################
|
||||
@@ -189,6 +198,9 @@ main() {
|
||||
|
||||
# Restore files stored in permanent data that are not permanent (i.e. internal_options.conf)
|
||||
apply_exclusion_data
|
||||
|
||||
# Apply correct permission and ownership
|
||||
set_correct_permOwner
|
||||
|
||||
# Rename files stored in permanent data (i.e. queue/ossec)
|
||||
move_data_files
|
||||
|
Reference in New Issue
Block a user