PHP file write permission

view story

http://serverfault.com – I have two files, one php file and one log file. The permission has been changed to the following: -rwxr-x--- 1 www-data www-data 294 2012-06-25 10:17 function.php -rwxr-x--- 1 www-data www-data 0 2012-06-25 09:53 log.txt The permission is set to 750. when I call function.php, I receive the following error message fopen(log.txt): failed to open stream: Permission denied This is the line : $fp = fopen("log.txt","a"); I am very confused. I have php and the file to be written both under www-data now, so why would there be any permission problem? Please help (HowTos)