function fopen failed to open stream: Permission denied

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Locked
antoniobanjeras
Forum Newbie
Posts: 10
Joined: Mon Aug 04, 2008 11:13 pm

function fopen failed to open stream: Permission denied

Post 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
antoniobanjeras
Forum Newbie
Posts: 10
Joined: Mon Aug 04, 2008 11:13 pm

Re: function fopen failed to open stream: Permission denied

Post by antoniobanjeras »

Locked