Check File Permissions
$path = “/mypath/myfile.txt”
$stat = stat($path);
print_r(posix_getpwuid($stat['uid']));
// will return something like:
array(7) {
["name"]=>
string(13) “php.net”
["passwd"]=>
string(1) “x”
["uid"]=>
int(148864)
["gid"]=>
int(148910)
["gecos"]=>
string(13) “php.net”
["dir"]=>
string(25) “/home/sites/php.net”
["shell"]=>
string(13) “/sbin/nologin”
}