Skip to content

Commit

Permalink
Ensure gnupg directory and files are owned by ossec
Browse files Browse the repository at this point in the history
  • Loading branch information
rocodes committed Dec 22, 2020
1 parent 4a5f6d3 commit c639a03
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions install_files/securedrop-ossec-server/DEBIAN/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ case "$1" in

chown root:${GROUP} ${OSSEC_HOME}/rules/local_rules.xml
chmod 440 ${OSSEC_HOME}/rules/local_rules.xml

# Ensure correct gnupg directory permissions
find ${OSSEC_HOME}/.gnupg -type f -exec chmod 600 {} \;
find ${OSSEC_HOME}/.gnupg -type d -exec chmod 700 {} \;

# Ensure correct gnupg directory permissions and ownership
chown -R ossec:${GROUP} ${OSSEC_HOME}/.gnupg
find ${OSSEC_HOME}/.gnupg -type f -exec chmod 600 {} \;
find ${OSSEC_HOME}/.gnupg -type d -exec chmod 700 {} \;

# Replace localhost with 127.0.0.1 for smtp_server due to
# https://github.com/ossec/ossec-hids/issues/1145
Expand Down

0 comments on commit c639a03

Please sign in to comment.