On a server I own; Git was not working. I found that Git is installed in

So, to make Git available to be used without full path; I logged into ssh as root. Then I modified ~/.bash_profile (vim .bash_profile) and appended /usr/local/cpanel/3rdparty/bin with PATH.

PATH now looks like:


With this; git is now working fine. But I just want to make sure that nothing is messed up.

1 Answer 1


It doesn't look messed up, and you put the directory at the end of your PATH, so commands in that directory cannot mask some system command.

Here are a few additional things you can check:

  • Are there any strange commands in the directory that have nothing to do with git, in particular ones that look like mistyped "common" commands (e.g. mroe as mistyped more).
  • The write permissions on the directory should be for root only
  • Reconsider why you need root to use git, if it is for revision control of e.g. the /etc directory then that is fine. If you do normal software development, you should reconsider setting that up so you can do that as normal user.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .