I have the following script:
I am using readfile(); to serve files:
$path = '/data/'. $arr["$product"] .'';
[error] [client xx] PHP Warning: readfile(/data/xxx.iso): failed to open stream: Permission denied in /var/www/vhosts/default/download/index.php on line 33, referer: http://zxc.com/
I found the problem. It seems SELinux was enabled. Disabled SELinux and it is working now.