Skip to content

Commit

Permalink
fixed permissions and log files for ClamAV
Browse files Browse the repository at this point in the history
  • Loading branch information
mlodic committed Dec 27, 2023
1 parent 6494446 commit 0e85ad1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
7 changes: 4 additions & 3 deletions integrations/malware_tools_analyzers/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,10 @@ RUN chown -R ${USER}:${USER} ${PROJECT_PATH} \
COPY clamav/etc/* /etc/clamav
COPY clamav/sigs/* /var/lib/clamav
# Permission juggling for ClamAV Analyzer
RUN mkdir /var/run/clamav && \
chown ${USER}:${USER} /var/run/clamav && \
chmod 755 /var/run/clamav
RUN mkdir -p /var/run/clamav ${LOG_PATH} ${LOG_PATH}/clamav&& \
touch ${LOG_PATH}/gunicorn_access.log ${LOG_PATH}/gunicorn_errors.log && \
chmod 755 /var/run/clamav && \
chown -R ${USER}:${USER} /var/run/clamav ${LOG_PATH}

# Serve Flask application using gunicorn
EXPOSE 4002
Expand Down
2 changes: 1 addition & 1 deletion integrations/malware_tools_analyzers/clamav/etc/clamd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ LogRotate true
LogFacility LOG_LOCAL6
LogClean false
LogVerbose false
LogFile /var/log/intel_owl/clamav/clamav.log
LogFile /var/log/intel_owl/malware_tools_analyzers/clamav/clamav.log
LogTime true
LogFileUnlock false
LogFileMaxSize 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LogSyslog false
LogTime yes
PidFile /run/clamav/freshclam.pid
Foreground true
UpdateLogFile /var/log/intel_owl/clamav/freshclam.log
UpdateLogFile /var/log/intel_owl/malware_tools_analyzers/clamav/freshclam.log
LogVerbose false
LogSyslog false
LogFacility LOG_LOCAL6
Expand Down
4 changes: 1 addition & 3 deletions integrations/malware_tools_analyzers/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash
mkdir -p ${LOG_PATH}
touch ${LOG_PATH}/gunicorn_access.log ${LOG_PATH}/gunicorn_errors.log
chown -R malware_tools_analyzers-user:malware_tools_analyzers-user ${LOG_PATH}
chown clamav:${USER} /var/lib/clamav ${LOG_PATH}/clamav
# clamav processes
echo "running freshclam"
freshclam # download db for first time
Expand Down

0 comments on commit 0e85ad1

Please sign in to comment.