MacOS – Mercurial command line client not found

macospermissionterminal

I have the latest version of Mercurial installed on a fully patched Lion and the Mercurial client cannot be accessed from the terminal ("command not found"). The command line client is installed in /usr/local/bin and I've checked that this directory is in my $PATH variable.

The funny thing is that if I log on as the root user via sudo, I can access the command line client! I've checked the permissions of hg and it's +x for all users.

What could be wrong?

Best Answer

I found the cause.

It looks like the permissions on /usr/local/bin was 700, which is wrong. It should be 755. Changing the permissions fixed it and I can now access the mercurial command line client.