Everyone hates antivirus software – except IT departments.
Sophos does a particularly annoying thing on my work MacBook... some process (I think it's called "Sweep") constantly changes the permissions on /usr/local/bin
so that I can't update or install Homebrew packages.
This unlocks things temporarily:
sudo chown -R $(whoami) /usr/local/bin