unlink - permission denied

Discussion in 'PHP' started by entropicsinkhole, Jun 7, 2007.

  1. #1
    Using PHP 5.2.1, MS Server 2003

    Hi, hoping someone who understands PHP can give me a hand with this.

    When the webmail application I'm using (squirrelmail) executes the following line in the php script:

    unlink($attachment_dir . $temp_file);

    I get this error:

    Warning: unlink(D:/SMData/Attachments/d8a356be315e72d1fae066fd61cb5a66) [function.unlink]: Permission denied in D:\xampp\htdocs\mail\plugins\abook_import_export\address_book_import.php on line 216

    The webserver process/user has full access to and ownership of the D:\SMData\Attachments directory

    Basically, it can't delete the files that the script creates in that folder.

    There are no errors in the php error.log

    What other permissions could it be referring to?

    Thanks
     
    entropicsinkhole, Jun 7, 2007 IP
  2. brealmz

    brealmz Well-Known Member

    Messages:
    335
    Likes Received:
    24
    Best Answers:
    3
    Trophy Points:
    138
    #2
    you sure? have you tried
    
    echo substr(sprintf('%o', fileperms($attachment_dir)), -4);
    Code (markup):
     
    brealmz, Jun 7, 2007 IP