Nginx host files created by a different service

a service starts a program that creates static files that I want to host with nginx, but the service (specifally minecraft-server) creates these files not as the nginx user. And so nginx can’t access these files.

my idea was to just add nginx to a group with the minecraft user:

  users.groups.minecraft = {
    members = [
  }; = {
    serviceConfig = {
      Group =;

but nginx still gives me a 403. just to test I also ran

chown minecraft:minecraft /var/lib/minecraft/ -R
chmod 2755 -R /var/lib/minecraft/plugins/dynmap/ -R

but still nginx can’t access these files.

What’s the recommended way to go about this?