Permission denied with unlink

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Yaakovk
    New Member
    • Jul 2012
    • 2

    #1

    Permission denied with unlink

    I have a PHP script that I pass in the name of a file, it pushes the file to another computer, copies the file to an archive directory and unlinks the file. It works fine.
    I have 2 programs that call the script both call it the same way, either I can call it with a <form> (to post 1 file at a time) or rapid fire with cURL (to post all). Program A works fine either way but program B if I call it with the <form> it works fine, if I call it with cURL it won’t unlink and it gives me a Permission denied error. How do I fix this?
  • Murat Bastas
    New Member
    • Jul 2012
    • 25

    #2
    you set chmod($folder,0 777) before unlink.

    Comment

    • Yaakovk
      New Member
      • Jul 2012
      • 2

      #3
      The dilemma I’m having is
      1) It is in windows and you can’t chmod($folder,0 777)
      2) If I call it with a form it works but when I call it with cURL it does not for 1 directory and does for another.

      Comment

      Working...