If I enter
whoami in Terminal.app my id is shown as Abhi.Sri
Now if I do
chown -R Abhi.Sri /usr/local it says the user Abhi.Sri is invalid.
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
I think your short username is malformed. I recommend to rename it to lower case characters (and no special characters except the underscore).
Additionally you would have to use a sudoers account (e.g. an admin account) and prepend
sudo to change ownership of /usr/local since /usr/local is owned by root:wheel. Changing the ownership of /usr/local and subsequent items is non-standard and not recommended.