I was recently working on an nginx lua script to aid with impersonation (setfsuid, setfsgid, setgroups) so I could implement a multi-user webdav server, mostly with the goal of pointing it at some existing file mounts and making sure permissions were checked/honored correctly - especially file ownership. I need to test it a lot more, but in case anyone is interested: