Ubuntu 20.04.1
Sites on my Ubuntu servers suddenly started logging file permission errors. phpinfo() showed they were running under www-data instead of the virtual server owner user. Tracked the problem down to a new version of /etc/apache2/conf-available/php7.4-fpm.conf installed on 2021-02-14. The new file puts the SetHandler directive in an If clause:
<If "-f %{REQUEST_FILENAME}">
SetHandler "proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost"
</If>
Removing the If lines solved the problem.
This was a tricky one to figure out, so I thought I’d post it for the benefit of others.