<system> umask` / `--umask` is not applied to worker-created files under a foreground supervisor

Abierto
#5,435 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@mbmtbtbc ya está trabajando en esto.

Desde el 15/7/2026.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
ruby
Área
backend

Línea de trabajo

Traza cómo fluyen --umask y umask a través del supervisor en primer plano y ServerEngine, centrándote en el punto de entrada worker_chumask y en la creación de fragmentos del búfer de archivos. Compara el comportamiento de --no-supervisor, --daemon supervisado y el comportamiento supervisado en primer plano; después, añade cobertura o documentación para que los workers en primer plano respeten la umask configurada o para que la limitación del modo quede registrada explícitamente.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement
Is your feature request related to a problem? Please describe.

Follow-up from #5390, and related to #4816

Both --umask and <system> umask set the process umask, but the effect on worker-created files (e.g. file buffer chunks) depends on the run mode:

  • --no-supervisor (standalone): applied — Fluentd calls File.umask directly in the worker.
  • Supervised + --daemon (daemonize, e.g. fluent-package): applied — ServerEngine sets the umask before spawning workers, so workers inherit it.
  • Supervised without --daemon (foreground): not applied — ServerEngine's non-daemonize path doesn't call File.umask, and Fluentd doesn't pass worker_chumask, so workers keep the inherited (shell) umask.

Verified on all three modes: a file buffer chunk created with umask 0077 is 0600 under --no-supervisor and --daemon, but stays 0644 when running fluentd -c fluent.conf in the foreground.

This is existing behavior, not a regression from #5390. Opening this to decide whether to close the gap (e.g. by passing worker_chumask to ServerEngine so foreground workers honor the umask too) or to document it as a known limitation of the run mode.

Describe the solution you'd like

Make --umask / <system> umask also apply to worker-created files under a foreground supervisor (e.g. by passing worker_chumask to ServerEngine so workers set their umask explicitly rather than relying on inheritance)

Describe alternatives you've considered

If the current behavior is intentional, document the per-mode applicability instead, so foreground-supervisor users don't expect it to affect buffer file permissions.

Additional context

No response

Lenguaje dominante
Ruby
Estrellas
13.6k
Forks
1.4k
Merge medio
1 d 1 h
PR fusionados (30 d)
61

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de fluent/fluentd

Todos los issues de fluent/fluentd

Issues similares

Más issues de Ruby

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.