Let's think about it this way for a second
chown (change owner) changes the owner user of a file or folder. Typing chown newuser file.txt changes file.txt's owner to newuser. You can also write chown newuser:newgroup file.txt to change both owner and group at once. chgrp is used when you want to change just the group. If you want to change ownership of an entire folder, including every sub-folder and file inside it, you need chown -R (recursive) — the same pattern you saw with cp -r and rm -r.
Let's connect this to a real-world scenario
On a server, you'll often need to change a website folder's owner to a deploy user (like www-data) before the web server can even read the files — sudo chown -R www-data:www-data /var/www/mysite. As an ordinary user, you can't run chown without sudo even on your own files — changing ownership is a privileged operation.
Let's try it together in the terminal
sudo chown alice notes.txt
sudo chown alice:developers notes.txt
sudo chgrp developers project/
sudo chown -R www-data:www-data /var/www/mysiteRunning ls -la again will show the owner column changed to the new user.5-Minute Try-It
Run ls -la on one of your files and check who the owner is. Write a note on chown's syntax (user:group), and keep in mind you'll need sudo to actually run it.
A Quick Word of Caution
Be extremely careful running chown -R (recursive) on system-wide folders — changing ownership of an entire large folder can cause services to stop working.