As I understand the www-data user is the user that owns the apache service.
/etc/passwd file I have:
So the home dir for www-data is: /var/www but if I check the permissions for that folder I get:
/var/www $ ll total 12 drwxr-xr-x 3 root root 4096 Mar 20 19:42 ./ drwxr-xr-x 12 root root 4096 Mar 20 19:42 ../ drwxr-xr-x 2 root root 4096 Mar 20 19:42 html/
So it appears that root owns that folder. Why is it not the www-data user that owns the /var/www directory (its home directory)?