This function attempts to change a file’s owner. Only the superuser can perform this action so it may not work for you depending on how your system is configured.

It will return false if unsuccessful.

chown( '/home/admin/test/one_file.txt',
       'admin' );
chown( '/home/admin/test/nother_file.php',
       'root' );