Report this

What is the reason for this report?

File Upload Error

Posted on May 4, 2020

I was using sharing hosting and using verot to upload images. It was working fine. Then I moved my files to DO droplet, and it gives the error Destination directory can't be made writeable. Can't carry on a process.

I tried to add tmp file in php.ini but still doesn’t work. And chmod 777 didn’t work.

Do you have any idea to fix it? Thanks



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there @dtorgul,

Are you using a CMS like WordPress? If so, I’ve seen this problem after migration to a new server, you need to make sure that you update your WordPress upload path so that it matches the new path on your server.

To change that you need to adjust the value at Settings> Media> Set Full URL Paths to files.

If you are not using WordPress, I would recommend checking your PHP and Apache error logs for more information on the exact error.

Let me know how it goes! Regards, Bobby

Thanks for the answer Bobby! I am not using any kind of cms. I checked my apache error logs but I couldn’t find any clue about this error.

But when I upload the image, php error message is like

Warning: move_uploaded_file(ykln/1_EuMoSuvQHcKMgfji2H5Ssg.jpeg): failed to open stream: Permission denied in /var/www/html/beta/dsykl.php on line 14

Warning: move_uploaded_file(): Unable to move '/tmp/phpMMFUUW' to 'ykln/1_EuMoSuvQHcKMgfji2H5Ssg.jpeg' in /var/www/html/beta/dsykl.php on line 14

I solved the problem. It’s about the folder permission. If anyone gets this error, use this command chcon -R --type httpd_sys_rw_content_t /path/to/your/directory

And then make sure that your folder permission is 0755

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.