This problem must come up all the time but I haven’t found a solution by searching.
When hugo generates html pages running as an ordinary user e.g. peter, files are written like this
-rw-r–r-- 1 peter peter 11748 Feb 11 07:22 index.html
To be readable by nginx they need to be readable by www-data. (user peter is a member of www-data group but that doesn’t help). If I chown or chmod the html file tree so nginx can read it then next time hugo runs it fails because user peter doesn’t have permissions.
Any ideas (short of a horrible script to shuttle permissions back a forth!)?