I tried the script...
fo = fileowner(__FILE__);
...and got the following message:
Warning: chown(): Operation not permitted in /XXX/YYY/ZZZ/MY-SITE.com/index.php
on line 16
I also tried the following:
print_r( posix_getpwuid( fileowner($fileFigs) ) ) ==> Array
[name] => root
[passwd] => x
[uid] => 0
[gid] => 0
[gecos] => root
[dir] => /root
[shell] => /bin/bash
I also tried numerous Googled solutions without success.
According to the PHP manual:
Attempts to change the owner of the file filename to user user. Only the superuser may change the owner of a file.
As mentioned manually creating a directory above the root and saving a file in the directory works OK and appears to be secure so I will stick with that solution and keep an eye out for other solutions.