I've looked through more sites than I care to remember but can't find a definitive answer for this.
When trying to do any updates, I get the following:
To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.
I connect via SFTP and have to import a key into Filezilla. I log in via root
Running a whoami on the site brings me back www-data.
What do I need to do in order to get updates working on the site? I remember back in the day I had to change permissions but this caused a few headaches with SFTP.