I understand it as you have copied files from a file server to the Sharepoint site that belongs to a Team. And now you would like to see who got permissions to read the files on the file server and add them to the Team as members.
I suggest you check the permissions with a powershell script that collects the permissions and saves it to a csv file. You can then clean this by removing builtin groups as Administrators. And if it is groups that have permissions you have to expand them first so you get the user names. https://www.netwrix.com/how_to_export_folder_permissions.html