Issue
I try a simple php upload file on Ubuntu, it not work. Even it work on Window
Here my html coded.
<form action="upload.php" method ="post" enctype="multipart/form-data">
<input type="file" name="file" />
<input type="submit" value="submit" name="submit"/>
</form>
Here my php coded.
<?php
$name = $_FILES['file']['name'];
$temp = $_FILES['file']['tmp_name'];
if(move_uploaded_file($temp,"upload/".$name)){
echo "Your file was uploaded";
}
else
{
echo "Your file cound't upload";
}
?>
Solution
Change permission to UPLOAD file into upload folder on UBUNTU
Read + Write
sudo chmod -R a+rw upload/
Read + Write + Execute
sudo chmod -R a+rwx upload/
Answered By - Samreach Answer Checked By - Gilberto Lyons (WPSolving Admin)