PHP写文件 - 权限被拒绝

I can't seem to get PHP to write to a text file on my Apache web server.

The file itself (log.txt) has an owner of "apache:apache" with access "-rw-rw-r--", its folder is owned by "apache:apache" and has permissions "drwxrwxr-x"...

Every time I tried to access log.txt, the Apache log reports "Permission Denied" on that file name.

Can anyone help?

Thanks.

apache usually runs as user www-data:www-data not apache:apache. Are you sure the right uid/gid?

Try writing to a new file and see who owns it