Linux Permissions and Links Cheat Sheet/Recursively change ownership

Update owner and group across a tree.

Section: Ownership and umask

Recursively change ownership

bash
bash
sudo chown -R www-data:www-data /var/www/app

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Ownership and umask
Change owner and group
Set file owner and group together.
OpenIn sheetbashsame section
Change group
Set a file's group without changing owner.
OpenIn sheetbashsame section
Show and set umask
Inspect and change default permission mask.
OpenIn sheetbashsame section
Change permissions recursively
Apply mode changes to a directory tree.
OpenIn sheetbash1 tag match
Add execute permission for user
Grant user execute permission.
Set setuid bit
Set executable to run with owner's effective UID.