File Permission Error in PHP fopen() function
My Question has to do with the following error given by the following line in my PHP code. Also included is the details of the files and foolder. In this case the file I want is in the Chapter02 folder and is also owned by root.
Errors returned from PHP (browser):
Warning: fopen("/var/www/html/chapter02/orders.txt", "a") - Permission denied in /var/www/html/chapter02/processorder.php on line 55
Line in Source:
$fp = fopen ("$DOCUMENT_ROOT/chapter02/orders.txt", "a");
A brief listing of my root:
dr-xr-xr-x 2 root root 4096 Aug 10 01:59 chapter01
dr-xr-xr-x 2 root root 4096 Aug 10 02:20 chapter02
dr-xr-xr-x 2 root root 4096 Feb 22 2001 chapter03
It seems to me that this may be a permissions issue according to the which user is the owner of a file create in my PHP app - it seems to me that httpd should be the owner and group but I am not sure...
Greatly appreciate your help and clarification to this problem.
Tuka
|