Page 1 of 1

function fopen failed to open stream: Permission denied

Posted: Thu Nov 27, 2008 9:00 pm
by antoniobanjeras
helo to all php/linux experts,

im using php to modify flat files (file.txt) on Linux platform. my php files are located in /var/www/html folder. but my flat files are in /etc/somefolder.

i've chown the /etc/somefolder and all the flat files to apache.apache and chmod to 0777.
but im not able to update/modify the flat files because of the Permission denied error as above.

1. is my approach correct?
2. should i move my flat files to /var/www/html, instead of /etc/somefolder?
3. in order to modify the flat files, can we change the permission to other than 0777?

pls help
p/s: i've posted this thread in php link

Re: function fopen failed to open stream: Permission denied

Posted: Thu Nov 27, 2008 10:08 pm
by antoniobanjeras