Permission problems with /usr/local/bin and /usr/local/share

回眸只為那壹抹淺笑 提交于 2019-12-06 04:09:07

问题


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!


回答1:


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"




回答2:


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.




回答3:


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 returns Your system is ready to brew.



来源:https://stackoverflow.com/questions/32792605/permission-problems-with-usr-local-bin-and-usr-local-share

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!