I'm using OS X Yosemite in a fresh MacBook. Just installed Homebrew and some essential packages, having moved to this new computer recently.
I noticed that once in a while I get linking errors when I install new brew packages. For some reason, the permissions of /usr/local/bin
and /usr/local/share
keeps changing back to root:wheel
even after I did chmod
andchgrp
several times to make it FP:admin
(FP being my username).
Take note, it fixes the permissions for a time, allowing me to install new brew packages, and changes back to root:wheel
automatically at random (at least as per my observation).
Been trying to Google answer to no avail. Any thoughts at what might be wrong with my setup? Appreciate the insights. Thanks!
You using Sophos by chance?
Via https://apple.stackexchange.com/questions/178760/how-to-figure-out-what-is-causing-the-ownership-of-usr-local-to-change-from-my
"I had this exact same issue, and it turns out Sophos auto-update was to blame. I figured this out by running: sudo fs_usage | grep "usr/local"
Running an existing MBP, now on 10.10.5 and this is happening to me seemingly every time I sleep/wake. At least once daily. No clue what's causing this yet.
Claco's answer about Sopho's Anti Virus software led me to fix this problem on my machine. I recommend upgrading Sophos.
My machine is a new 2015 Mac Book Pro (OSX 10.10.5) with Sophos 9.2.8 installed on it at first. Every time I restarted and ran
brew doctor
I'd get the same warnings about permissions in/usr/local/bin
,/usr/local/share
, etc. -- even though I reset those permissions each time.After upgrading to Sophos Anti Virus 9.4.1, setting the permissions again, and restarting,
brew doctor
finally returnsYour system is ready to brew.