must run /usr/local/... apps as sudo?

Has something deep in the esoteric bowels of OS X changed in Snow Leopard that now requires me to "sudo" any application I might otherwise run from /usr/local? Examples: mysql and git are installed to /usr/local/mysql-5.0.67 and /usr/local/git (respectively) — both of which were installed on this MacBook Pro while running 10.5, both of which ran just fine (as my normal user) for months, and now both... there but won't run unless I sudo...

Example!

20:16:51 ~
rob@Connemara $ git --version
-bash: git: command not found

20:17:04 ~
rob@Connemara $ /usr/local/git/bin/git --version
-bash: /usr/local/git/bin/git: Permission denied

20:17:18 ~
rob@Connemara $ sudo git --version
git version 1.6.4.2



(1) Yes, /usr/local is in my $PATH.
(2) Yes, /usr/local/git/bin is in my $PATH.
(3) Ditto /usr/local/mysql (symlinked...)

...anyone?



NOTE: originally posted at http://discussions.apple.com/thread.jspa?messageID=10137622&tstart=0#10137622 - and re-posted here per another user suggestion.

MacBook Pro, Mac OS X (10.6)

Posted on Sep 6, 2009 4:46 AM

Reply
6 replies

Sep 6, 2009 7:25 AM in response to Linc Davis

Linc Davis wrote:
What do you get from
ls -ld /usr/local; ls -l !$

?


[10:22:49 ~]
rob@Connemara $ ls -ld /usr/local; ls -l !$
ls -ld /usr/local; ls -l /usr/local/git/bin/git
drwx------ 10 root wheel 340 Sep 5 19:02 /usr/local
ls: /usr/local/git/bin/git: Permission denied

[10:23:26 ~]
rob@Connemara $ sudo ls -ld /usr/local; sudo ls -l /usr/local/git/bin/git
Password:
drwx------ 10 root wheel 340 Sep 5 19:02 /usr/local
-rwxr-xr-x 1 root wheel 1079044 Sep 3 13:38 /usr/local/git/bin/git

Message was edited by: founddrama

Sep 6, 2009 7:26 AM in response to founddrama

It would appear permissions have been changed.

To get "command not found", one or more directories between /usr/local and /usr/local/git/bin have either been changed to remove your ability to search the directory (the x in rwxr-xr-x; and most likely it is the last x), and/or read permission has been removed from one or more of those directories.

The "permission denied" indicates that the git executable no longer allows your account execute permission (again the x in rwxr-xr-x; most likely the last x), and/or read permission.

The fact that sudo can execute git indicates that the directories and the git executable have sufficient permissions to allow root access and the ability to execute the program.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

must run /usr/local/... apps as sudo?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.