The chown command (abbreviation for change owner) is used on Unix-like systems to change the owner of a file.
sudo chown -R <owner>:<group> /usr/local/
In Unix-like operating systems, chmod is the command and system call which may change the access permissions to file system objects.
sudo chmod -R g+w /usr/local/