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!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.