chown
, como chmod
, pode usar uma referência :
chown [OPTION]... --reference=RFILE FILE...
Change the owner and/or group of each FILE to OWNER and/or GROUP. With
--reference, change the owner and group of each FILE to those of RFILE.
Então:
chown --reference=/some/folder -R /some/folder