This is because
tmp_file_upload are only writable by
root user. For upload to work we need to make the owner of those folders same as httpd process owner OR make them globally writable (bad practice).
- Check apache process owner:
ps aux | grep httpd. The first column will be the owner typically it will be
Change the owner of
tmp_file_uploadto be become
nobodyor whatever the owner you found in step 1.
$sudo chown nobody /var/www/html/mysite/images/
$sudo chown nobody /var/www/html/mysite/tmp_file_upload/
tmp_file_uploadnow to be writable by the owner, if needed [Seems you already have this in place]. Mentioned in @Dmitry Teplyakov answer.
$ sudo chmod -R 0755 /var/www/html/mysite/images/
$ sudo chmod -R 0755 /var/www/html/mysite/tmp_file_upload/
For more details why this behavior happend, check the manual http://php.net/manual/en/ini.core.php#ini.upload-tmp-dir , note that it also talking about