So my website was working, but suddenly I started getting errors saying no one could upload images. I did some poking around and the common solution is to change the upload folder to 777. That works if the folder is on the lowest level, but it is also an unacceptable security risk. It also doesn't help when the next month rolls around, or any time we get a new user who needs a new upload folder.
A bit more poking, I realise that while all the folders are owned by my ftp user, and that's what wordpress has been operating as most of the time, now it's uploading files owned by dhapache instead. That's why it needed world access to be able to upload photos.
Reading further, it says it's something my hosting company needs to fix, but it seems they are a bit useless - the email I got back made it pretty clear the guy didn't even understand the problem I was describing.
So, does anyone know any way I can change which user wordpress is operating under, without having to get my host to do it. I am on a VPS and I have root access.
I am very close to just switching hosts, but when I tried to export my database, that didn't work either, so moving may be an issue.