I would like to have a script that would change the ownership of a file based on the name of the file.

For example i have a folder containing users document folders named bursary, jbloggs, apupil and would like to run a script that would change the owner to the name of file i.e jbloggs and also add the user and administrator with full permissions.

Does anyone have a script that can do this?