Mtdhanmani / git-osx-installer

Automatically exported from code.google.com/p/git-osx-installer
0 stars 0 forks source link

must "sudo git" on Snow Leopard ? #38

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. install git on a Mac running Snow Leopard
2. run secondary installer script to make it accessible by non-command line 
programs (optional)
3. make sure /usr/local/git/bin is in your $PATH
4. 'git --help' will tell you it can't find git; 'sudo git --help' will print 
the help statement

What is the expected output? What do you see instead?
I expect git to work w/o having to sudo it

What version of the product are you using? On what operating system?
git 1.6.4.2; OS X 10.6

Please provide any additional information below.
worked fine under Leopard 10.5.x

Original issue reported on code.google.com by founddr...@gmail.com on 5 Sep 2009 at 7:14

GoogleCodeExporter commented 8 years ago
odd. What are the permissions of /usr/local/git/bin ?

Original comment by timchar...@gmail.com on 8 Sep 2009 at 6:48

GoogleCodeExporter commented 8 years ago
@timcharper--  

Tracked this through in the Apple discussion forums here: 
http://discussions.apple.com/thread.jspa?
messageID=10139530

Permissions came up as:

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

And:
sudo chmod 755 /usr/local

...appeared to solve the problem.

So it turns out that the problem is not with the installer but rather with how 
the OS X 10.6 installer resets the 
permissions on /usr/local such that the git installer completes as though the 
installation was successful 
(because it was) even though the user account may not be able to access it.

Original comment by founddr...@gmail.com on 8 Sep 2009 at 11:22

GoogleCodeExporter commented 8 years ago
Can you try out the latest package and see if it fixes things? Sheldon has been 
helping with snow leopard 
compatibility.  Thanks!

Original comment by timchar...@gmail.com on 17 Sep 2009 at 7:26

GoogleCodeExporter commented 8 years ago
seems to work out ok

Original comment by founddr...@gmail.com on 18 Sep 2009 at 12:01

GoogleCodeExporter commented 8 years ago
I also have permission problems. I tried changing permissions to 755 and even
changing ownership to my own user (although I reverted that as it didn't help). 
What
do you make of this:

peter-marklunds-macbook-pro-15:~ peter$ ls -l /opt/local
ls: /opt/local: Permission denied

peter-marklunds-macbook-pro-15:~ peter$ sudo ls -ldh /opt/local
drwxr-xr-x  11 root  admin   374B Sep 28 14:22 /opt/local

peter-marklunds-macbook-pro-15:~ peter$ ls -l /opt/local/bin
ls: /opt/local/bin: Permission denied

peter-marklunds-macbook-pro-15:~ peter$ /opt/local/bin/git
-bash: /opt/local/bin/git: Permission denied

peter-marklunds-macbook-pro-15:~ peter$ sudo ls -ldh /opt/local/bin/git
-rwxr-xr-x  2 root  admin   1.0M Sep 28 15:27 /opt/local/bin/git

Thanks!

Peter

peter-marklunds-macbook-pro-15:~ peter$ sudo ls -ldh /opt/local/bin/git
-rwxr-xr-x  2 root  admin   1.0M Sep 28 15:27 /opt/local/bin/git

peter-marklunds-macbook-pro-15:~ peter$ sudo chmod -R 755 /opt/local
peter-marklunds-macbook-pro-15:~ peter$ /opt/local/bin/git
-bash: /opt/local/bin/git: Permission denied
peter-marklunds-macbook-pro-15:~ peter$ sudo ls -ldh /opt/local/bin/git
-rwxr-xr-x  2 peter  staff   1.0M Sep 28 15:27 /opt/local/bin/git
peter-marklunds-macbook-pro-15:~ peter$ sudo ls -ldh /opt/local/bin
drwxr-xr-x  115 peter  staff   3.8K Sep 28 15:27 /opt/local/bin
peter-marklunds-macbook-pro-15:~ peter$ whoami
peter
peter-marklunds-macbook-pro-15:~ peter$ sudo ls -ldh /opt/local
drwxr-xr-x  11 root  admin   374B Sep 28 14:22 /opt/local
peter-marklunds-macbook-pro-15:~ peter$ ls -l /opt/local
ls: /opt/local: Permission denied
peter-marklunds-macbook-pro-15:~ peter$ ls -l /opt/local/bin
ls: /opt/local/bin: Permission denied
peter-marklunds-macbook-pro-15:~ peter$ ls -l /opt/local/bin/git
ls: /opt/local/bin/git: Permission denied
peter-marklunds-macbook-pro-15:~ peter$ sudo ls -l /opt/local/bin/git
-rwxr-xr-x  2 peter  staff  1094148 Sep 28 15:27 /opt/local/bin/git

Original comment by peter.ma...@gmail.com on 29 Sep 2009 at 2:40

GoogleCodeExporter commented 8 years ago
@peter - why are you dealing with /opt/local/bin ?  The git installer installs 
to /usr/local/git

Original comment by timchar...@gmail.com on 29 Sep 2009 at 2:44

GoogleCodeExporter commented 8 years ago
I fixed my permission issues. Seems there was a sticky permission bit (or 
something)
on /opt:

peter-marklunds-macbook-pro-15:~ peter$ sudo ls -ldh /opt
drwx------  3 root  admin   102B Sep 28 14:20 /opt

peter-marklunds-macbook-pro-15:~ peter$ sudo chmod 755 /opt

Now I can execute git without sudo.

@timcharper - my git-core package was not installed to /usr/local, it was 
installed
to /opt/local:

peter-marklunds-macbook-pro-15:~ peter$ sudo port contents git-core |grep 
'/usr/local'
peter-marklunds-macbook-pro-15:~ peter$ 

peter-marklunds-macbook-pro-15:~ peter$ sudo port info git-core
git-core @1.6.4.4 (devel)

peter-marklunds-macbook-pro-15:~ peter$ port -v
MacPorts 1.8.0

Original comment by peter.ma...@gmail.com on 29 Sep 2009 at 2:53

GoogleCodeExporter commented 8 years ago
OK :) you may have wandered to the wrong place.  This is the issue list for the 
Mac OS X git installer, not the 
port installer :)

Glad you found your problem anyways.

Original comment by timchar...@gmail.com on 29 Sep 2009 at 2:58