I accidentally set all files ownership to root. How to solve?

I accidentally set all my files to root ownership, How to solve this?. I have a multisite configuration. Please help.

Go to the file management section of the relevant site and do Fix Permissions in the top right corner.