I've been tinkering with Apache2 in Ubuntu and am trying to get a script of mine to be able to create files. It doesn't seem to be working, sadly. I think the issue is that whichever user is running doesn't have the right permission to create files. I've been going round in circles with this, though - I thought I had set the permissions for the /var/www (it's testing only so I'm not worried about security) to 777. Still no luck.
Is there anything I'm missing?
I've tried: adding my main user to the www-data user group; setting www-data as owning the /var/www folder, and lots of other attempts besides.
What have I missed?