sudo chown -R `whoami` /usr/local

Thread Tools Search this Thread
Operating Systems OS X (Apple) sudo chown -R `whoami` /usr/local
# 1  
Old 06-18-2011
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
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.
# 2  
Old 06-18-2011
is it working now ?

with what user permission you installled mcafee?
# 3  
Old 06-18-2011
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
# 4  
Old 06-24-2011
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.
This User Gave Thanks to [MA]Flying_Meat For This Post:
# 5  
Old 06-26-2011
As a general rule, never change ownership of a system level directory, and definitely do not change that ownership recursively
Sounds like good advice. Thank You
# 6  
Old 09-22-2011
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
This User Gave Thanks to doctorfoo1 For This Post:
# 7  
Old 11-21-2011
why you need McAfee Security?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. BSD

FreeBSD: /usr/bin/ld not looking in /usr/local/lib

I'm not sure if this is the default behavior for the ld command, but it does not seem to be looking in /usr/local/lib for shared libraries. I was trying to compile the latest version of Kanatest from svn. The script seems to exit without too much trouble: $ ./ checking... (2 Replies)
Discussion started by: AntumDeluge
2 Replies

2. Fedora

Clueless re Java: /opt vs. /usr/local

It seems this is a oft debated item, that's over my head. So here's what I've got: Java 7 set up at /opt/ but I really want it at /usr/local... What have I done? Have: Debian 7 (whezzy) with gnome, so what do I do to set things back where it should be? I guess this is a hot topic... (3 Replies)
Discussion started by: sas
3 Replies

3. Shell Programming and Scripting

Chmod working in sudo run script but chown isn't

My git user has permission in sudoers to run a wrapper script to move files into my webroot. Everything is working fine except for the chown line. After the script has run, the files ar still root:root instead of apache:apache. Scratching my head...:confused: #!/bin/sh echo echo "****... (4 Replies)
Discussion started by: dheian
4 Replies

4. Shell Programming and Scripting

/usr/local/bin/expr function not working

Legends, I am not able to set "expr" function in ksh script. Below is the sample code i used, and output is as "Syntax error" Please help me to come out of it. OUTPUT (9 Replies)
Discussion started by: sdosanjh
9 Replies

5. Solaris

restrict sudo and chown in specified directory

Hi Dears, I have one requirement like this: general user A can execute command C with root privilege by sudo configuration some folders and files are created during the command C execution user A cannot access those folders and files because the owner is root user, so I want the user A... (0 Replies)
Discussion started by: crest.boy
0 Replies

6. AIX

/usr/local/bin/cvs: Not found

I can able to access /usr/local/bin/cvs in the terminal (AIX 6.1 Box). but i am getting the "/usr/local/bin/cvs: Not found " when i call it from the script. please some one assist me what maybe problem (6 Replies)
Discussion started by: hifirockz
6 Replies

7. UNIX for Dummies Questions & Answers

Difference between /opt and /usr/local.

Hello Gurus, Can any one explain me the difference between /opt and /usr/local. When should we use them. Can we link with any directory in windows I mean similarity between unix and windows. (7 Replies)
Discussion started by: rama krishna
7 Replies

8. UNIX for Dummies Questions & Answers

/usr/local/lib is not searched by by default?

it seems that /usr/local/lib is not searched by by default in fedora14. If so, why some software put its lib files in /usr/local/lib? eg: glib and gtk+. (6 Replies)
Discussion started by: vistastar
6 Replies

9. Solaris

Questions about /usr/local/bin & scripts.

Hi gentlemen. For what intended is the directory /usr/local/bin? In this directory are some script. I don't understand how these scripts being in this directory are started. Each time after registration of the user occurs start of these scripts. These scripts start applications. (7 Replies)
Discussion started by: wolfgang
7 Replies

10. BSD

configure /usr/local/etc/be-agent.cfg

hi Howto configure Ralus at /usr/local/etc/be-agent.cfg on freeBSD 7.0 for Backup Exec 9.1? I've tried the following: # cat /usr/local/etc/be-agent.cfg name bsd.domain export / as root export /usr as usr export /var as var export /tmp as tmp force_address tell... (0 Replies)
Discussion started by: ccc
0 Replies
Login or Register to Ask a Question

Featured Tech Videos