how to chown to a user a directory code example
Example 1: change user linuxcommand ch
chown USER:GROUP FILE
Change the user and grop for an entire folder:
chown -R USER:GROUP FILE
Example 2: how to change owner of all files in a directory
# Using the '*' wildcard you can include all other files and dirs
# Only us as many wildcards as you have layers in you directory
sudo chown <username:username> <directory_name>/*/*