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

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I’m overlooking something to do with permissions for imagemagick. I set up a new Ubuntu 16.04 droplet exactly as per the DO guide, giving my new user root privileges etc. Ditto for the LAMP stack, exactly per the DO guide and everything ran well.
I install imagemagick. It works fine, I can do various commands with it, it’s resizing and saving images I upload, until…
It won’t overwrite any of the existing images it had previously saved. It throws:
object(ImagickException)#2 (7) { ["message":protected]=> string(105) "unable to open image `/var/www/public_html/images/abcd.jpg': Permission denied @ error/blob.c/OpenBlob/2712"
This is running fine on with the same code on my local LAMP development server, so I’m pretty sure it’s a permissions issue (as well as it stating so in the error). What I don’t understand is that I can write to the folder ok, just not overwrite? All images, their folders and parents have 755 permissions. I’m a bit lost.
I have nothing else unusual going on in terms of users. PHP executing a userinfo request on the page states the user is www-data.
56bd8300516443db8f6e925c6721b4
affiliatetrading
admin
saeeddarabi
djanym
skeddtemp
gebelo
martinjameslynn
Brenda Morales
d02e0b7b59c2429cb46fcbb782