Skip to content

Instantly share code, notes, and snippets.

@ashleyblackmore
Last active February 21, 2017 00:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashleyblackmore/8bc945bba6f79cf591252fb5005fba99 to your computer and use it in GitHub Desktop.
Save ashleyblackmore/8bc945bba6f79cf591252fb5005fba99 to your computer and use it in GitHub Desktop.
Setting up ClamAV for macOS Sierra
# /usr/local/etc/clamav/clamd.conf
# n.b., mirrors not https at time of writing - regardless, setting this does not fail the update.
DatabaseMirror https://database.clamav.net
DatabaseDirectory /var/lib/clamav/
OfficialDatabaseOnly yes
# /tmp is not the best place for this, but need to choose somewhere writeable by clamscan/clamd user
LogFile /tmp/clamd.log
LogFileMaxSize 20M
LogTime yes
ExtendedDetectionInfo yes
# again, /tmp is not the best place
LocalSocket /tmp/clamd.socket
LocalSocketMode 660
FixStaleSocket yes
# in macOS prefs, set "Script Editor" notifications to 'alert' - will help force acknowledgement on signature match
osascript -e 'display notification "Lorem ipsum dolor sit amet" with title "Title"'
brew install clamav
# set config as shown (or as needed) in rest of gist
sudo mkdir -pv /var/lib/clamav
sudo chown clamav:clamav /var/lib/clamav/
sudo freshclam -v
# set up clamd if you want a daemon
clamscan --follow-file-symlinks=2 --follow-dir-symlinks=2 --bell -r -i /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment