There is a file(644, owner:apache) that I can't delete it using a PHP script with unlink function.
I can't figure it out why unlink fails to delete this file.
BTW, I have tried fclose it before unlink it. Unfortunately, it still didn't work.
“drwxrwxrwx 2 apache apache” apache have write access to the directory.
<?php echo getmyuid() . ' - ' . getmygid(); ?>what is the output ? I am guessing youre running your httpd server with antoher user that does not have access to the file. – Guapo Oct 15 '10 at 16:42cat /etc/passwd |grep 500on the console to check what username is it. – Guapo Oct 15 '10 at 16:55