Fixing homebrew permissions

Trying to install something using Homebrew you got the following error

Are you wondering how to fix it?