Skip to content

Commit

Permalink
Added permissions change for merged.mg files in upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
mjcr99 committed Nov 17, 2023
1 parent a4cf1c3 commit 8d4574c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions debs/SPECS/wazuh-manager/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ case "$1" in
chmod 0660 ${DIR}/logs/active-responses.log
chmod 0640 ${DIR}/logs/integrations.log

# Set merged.mg permissions to new ones
find ${DIR}/etc/shared/ -type f -name 'merged.mg' -exec chmod 644 {} \;

if [ -f ${DIR}/etc/shared/ar.conf ]; then
chown root:wazuh ${DIR}/etc/shared/ar.conf
Expand Down
3 changes: 3 additions & 0 deletions rpms/SPECS/wazuh-manager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ fi
rm -f %{_localstatedir}/etc/shared/ar.conf >/dev/null 2>&1
rm -f %{_localstatedir}/etc/shared/merged.mg >/dev/null 2>&1

# Set merged.mg permissions to new ones
find %{_localstatedir}/etc/shared/ -type f -name 'merged.mg' -exec chmod 644 {} \;

# CentOS
if [ -r "/etc/centos-release" ]; then
DIST_NAME="centos"
Expand Down

0 comments on commit 8d4574c

Please sign in to comment.