set_permission.sh reset owner DirectAdmin server

Problem: owner ?? in folder user directadmin when tranfer data with “rsync -va -e ‘ssh'”
Solution:
ls -l /home | grep '^d' | awk '{print "chown", "-R", $3 ":" $4 " /home/" $9 "/domains"}'
copy code show and paste in command line.

OR with directadmin script
/usr/local/directadmin/scripts/set_permissions.sh user_homes
/usr/local/directadmin/scripts/set_permissions.sh email

Blog |
Line it!