cannot unlink file that Apache and I have permissions to delete

From: Phil Powell (soazine_at_erols.com)
Date: 07/28/04


Date: 28 Jul 2004 10:14:40 -0700


[PHP]
print_r(is_file("$logPath/$logFileName")); // RETURNS 1
unlink("$logPath/$logFileName"); // RETURNS WARNING: PERMISSION DENIED
[/PHP]

This code should tell me that the file located at
$logPath/$logFileName should delete the log file, however, it never
deletes it due to permissions error.

However, upon checking the file properties I find this:

[List]
I am a member of the group with full permissions to edit/write/delete
the file
Apache is a member of the same group with full permissions to
edit/write/delete the file
Apache and I are in the group that has full permissions to
edit/write/delete all other files in the exact same folder and those
can ALL be edited, written or deleted
[/List]

This file was created and transferred the same way as all others, is a
text file and contains only text, no binary characters of any kind.
However, it can never be deleted even though I have permissions to do
so as does Apache.

What could I be doing wrong?

Thanx
Phil



Relevant Pages

  • Re: File permissions for a wiki-like site
    ... The question is what file permissions I need to allow for the ... content to be writable by my PHP script. ... The only one doing the writing will be the Apache user itself. ... I'd suggest you get a book on Linux Administration. ...
    (comp.lang.php)
  • Re: apache permission problem please help
    ... Ok as anyone reading this thread knows i have huge mess on hands. ... chmod -R 701 home ... mailclients but i moved one and had to modify the permissions all over ... >>apache was unable to use these files. ...
    (freebsd-questions)
  • Re: FC3 issue with apache 2
    ... permissions but due to SELinux. ... > apache, so naturally I set all my file ownership to my webdev user who ... Apache (the user/group it runs as, on Fedora as apache:apache) ... not paying attention at least not customizing the SELinux setup. ...
    (Fedora)
  • Re: File permissions for a wiki-like site
    ... The question is what file permissions I need to allow for the ... content to be writable by my PHP script. ... The only one doing the writing will be the Apache user itself. ... I'd suggest you get a book on Linux Administration. ...
    (comp.lang.php)
  • Re: File permissions for a wiki-like site
    ... I'm writing a site where a handful of people will be able to edit ... The question is what file permissions I need to allow for the ... content to be writable by my PHP script. ... The only one doing the writing will be the Apache user itself. ...
    (comp.lang.php)