I got a php script that makes a upload to my server. But it actualy don't works. I'm working on Kurumin Linux 2.13, Apache 1.3.26 and PHP4.
The source (it handles an string gotten in a form):
if ($file == "none") { echo"Try put an valid file.";
echo"<a href=index.html>back</a>";
}else {
copy($file, "myfile/".$file_name);
unlink($file);
echo"All Right!";
}
The erro:
Warning: Unable to create 'arquivos/exemple.txt': Permission denied in /var/www/up/upload.php on line 25
Ok, its a problem with permision, right?
But, how can I resolve this? How can I give permision to PHP write in my HD? Is it secure?
Thanks!