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

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.

×
3 answers

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 httpdsysrwcontentt /path/to/your/directory

And then make sure that your folder permission is 0755

Submit an Answer