sudo chown -R `whoami` /usr/local

I was following a tutorial on installing Homebrew and I changed the ownership of /usr/local/ to me. Now McAfee Security won't start This is the exact line I typed:

sudo chown -R `whoami` /usr/local

Then I tried to fix it with:

sudo chown -R root /usr/local

I still can't start mcafee. It say "McAfee Security software failed to launch. error Code: 1

I'm not sure who the original owner and group were. also in the process of installing Homebrew I changed permissions with

sudo chmod o-w/usr/local/bin
sudo chmod o-w /usr/local

I Think I changed them back correctly with:

sudo chmod o+w /user/local  
sudo chmod o+w /usr/local/bin 

Does anyone know what I need to do to get Mcafee working again?

Here is what ls -l looks like for those directories

drwxr-xr-x   2 root  staff    68 Jun 17 10:20 Cellar
drwxr-xr-x   6 root  staff   204 Jun 16 23:58 Library
drwxr-xr-x  10 root  wheel   340 Nov 16  2009 McAfee
-rw-r--r--   1 root  staff  1603 Jun 16 23:58 README.md
drwxrwxrwx  31 root  staff  1054 Jun 16 23:59 bin
drwxr-xr-x   8 root  wheel   272 Sep 23  2010 git
drwxr-xr-x   4 root  wheel   136 Sep 12  2010 hermes
drwxrwxrwx   6 root  wheel   204 May  2 20:57 include
drwxrwxrwx  23 root  wheel   782 May  2 20:57 lib
drwxrwxrwx   4 root  wheel   136 Nov 16  2009 man
drwxrwxr-x   3 root  staff   102 Oct  7  2010 sbin
drwxrwxrwx  10 root  wheel   340 Jun 16 23:58 share

Any advice is welcome

---------- Post updated at 12:32 AM ---------- Previous update was at 12:11 AM ----------

I rebooted and McAfee starts up. I'm hoping that everything is the way it should be. I can't run a manual update, but that may be because its already up to date.

with what user permission you installled mcafee?

It was a long time ago, but I know it was my administrative account. I tried to find out from the install logs, but I must be looking in the wrong location.

---------- Post updated at 10:45 AM ---------- Previous update was at 10:40 AM ----------

I just looked in the help file and it says "Prerequisites
You must have administrator rights to install McAfee Security."

---------- Post updated at 01:55 PM ---------- Previous update was at 10:45 AM ----------

I ran the McAfee repair utility (/usr/local/McAfee/repairMSC) Everything is working fine now

As a general rule, never change ownership of a system level directory, and definitely do not change that ownership recursively.

drwxr-xr-x 8 root wheel 272B Mar 8 15:58 local

The homebrew developers should get their hands slapped if they indeed require that /usr/local ownership be changed recursively. They have no idea what's in there, or the potential impact, apparently.

1 Like

Sounds like good advice. Thank You

greetings
drwxr-xr-x@ 14 root wheel 476 May 26 13:07 usr

chmod -Rf 755 /usr
chown -Rf root:wheel /usr

that should set you straight. Then relaunch your apps

1 Like

why you need McAfee Security?

When that sort of thing's installed on a UNIX machine, it's usually scanning network traffic for windows machines...