I'm not sure there's a definitive 'best practice'. I think it's something of a balancing act between security and functionality/convenience
On a server with multiple websites maintained by different users here's what I do:
1. Create a user and group, with a home directory. e.g., there'd be user 'cds', group 'cds', and home directory /home/cds, below which there'd be /home/cds/public_html for the website.
2. /home/cds and eveything below it is owned by user 'cds' group 'cds', include the website content. So user cds can login by SSH, SCP, FTP, etc. and have the site content readily accessible and have permissions to modify/delete anything.
2. Add the Apache user (in your case, www-data) to the group 'cds'. This can be done with the 'usermod' command, something like:
usermod -a -G cds www-data
3. Permissions for read/write access can then be adjusted (by user 'cds') as required:
- A directory set 750 is readable by Apache. This is the basic permission level required for the website to function.
- A directory set 770 is readable and writable by Apache. Your Wordpress upload directory (for example) would need this.
- Similarly, file access could be set 640 for read access and 660 for read/write access.
I don't claim this is the best approach, it's just how I do it
