[Feature] Make Nginx worker UID/GID configurable for NAS-mounted ROM libraries

Open
#5,338 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, nginx

Research direction

Start by locating how the container configures the Nginx worker identity and how it receives the RomM container UID/GID and supplementary groups. Reproduce the reported access failure with a CIFS mount presented as UID/GID X:X and mode 0770, then check whether the workers can access the ROM path. Done means a configurable or aligned worker identity lets downloads work while retaining restrictive permissions.

Written by the indexing model from the issue text.

Description

Proposed improvement: make Nginx worker permissions configurable

Could RomM expose a way to configure the UID/GID or group used by its Nginx worker processes, or otherwise ensure they use an identity compatible with the configured RomM container user?

In my setup, ROM downloads failed with:

nginx: open() "/romm/library/roms/SNES/gamepath" failed (13: Permission denied)

The ROM library is mounted from an SMB/CIFS NAS share. The mount presented files as UID/GID X:X with 0770 permissions, while the Nginx workers ran as UID/GID 1000:1000.

Although I configured group_add: ["X"] in Docker Compose, the Nginx workers did not have GID X in their supplementary groups. As a result, they could not access the files.

The issue was resolved by changing the CIFS mount to present files as UID/GID X:1000, retaining 0770 permissions. This allows the Nginx workers to access the files through their primary group, without making the library world-readable.

Ideally, I think users should not need to change their NAS mount's ownership mapping to accommodate an Nginx worker identity issue.

Could RomM make the Nginx worker identity configurable, or align it with the configured container UID/GID and supplementary groups? This would simplify deployments using NAS shares and Docker bind mounts while allowing users to retain restrictive filesystem permissions.

Great software, merely wanted to suggest an improvement but I'll keep using ROMM in any case & thanks for your work !

Dominant language
Python
Stars
13.3k
Forks
747
Avg merge
20h 58m
Merged PRs (30d)
207

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rommapp/romm

All issues in rommapp/romm

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.