Category Archives: Uncategorized

Recursively change the owner of the files, directories, and links in a directory

Not to change all owners of all items, but from one specific owner (user0) to another (user1) and not modifying the rest.
Trial run: make a text file of the current permissions of all of the items that will be changed

root@box# find /var/www-data/webapps/ -user user0  -print | xargs ls -ld > /tmp/perm-fix.txt

Actual run:

root@box# find /var/www-data/webapps/ -user user0 -print | xargs chown -h user1

References